1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-12-05 23:45:01 +01:00

fix eslint setup

This commit is contained in:
Matthias Kretschmann 2021-01-30 15:09:01 +01:00
parent f87f519b17
commit abf4914fff
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 45 additions and 11 deletions

View File

@ -1,4 +1,15 @@
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020,
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"configFile": "./babel.config.js"
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
@ -6,13 +17,6 @@
"prettier/react"
],
"plugins": ["react"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,

View File

@ -1,4 +1,4 @@
const { devDependencies } = require('../package.json')
const { devDependencies } = require('./package.json')
module.exports = {
presets: [

29
package-lock.json generated
View File

@ -286,6 +286,35 @@
}
}
},
"@babel/eslint-parser": {
"version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.12.1.tgz",
"integrity": "sha512-cc7WQHnHQY3++/bghgbDtPx+5bf6xTsokyGzV6Qzh65NLz/unv+mPQuACkQ9GFhIhcTFv6yqwNaEcfX7EkOEsg==",
"dev": true,
"requires": {
"eslint-scope": "5.1.0",
"eslint-visitor-keys": "^1.3.0",
"semver": "^6.3.0"
},
"dependencies": {
"eslint-scope": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz",
"integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
}
},
"eslint-visitor-keys": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
"dev": true
}
}
},
"@babel/generator": {
"version": "7.9.5",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz",

View File

@ -11,7 +11,7 @@
"test": "npm run lint && npm run jest",
"test:watch": "npm run jest -- --watch",
"jest": "NODE_ENV=test jest -c tests/jest.config.js",
"lint": "eslint --ignore-path .gitignore ./src/**/*.{js,jsx}",
"lint": "eslint --ignore-path .gitignore --ext .js --ext .jsx .",
"format": "prettier --write --ignore-path .gitignore 'src/**/*.{js,jsx,json,css,scss}'",
"release": "release-it",
"changelog": "auto-changelog -p"
@ -41,6 +41,7 @@
"swr": "^0.4.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.12.1",
"@jest-runner/electron": "^3.0.0",
"@react-mock/state": "^0.1.8",
"@svgr/webpack": "^5.5.0",
@ -50,9 +51,9 @@
"babel-jest": "^26.6.3",
"dotenv": "^8.2.0",
"electron": "10.1.3",
"electron-store": "^7.0.0",
"electron-builder": "^22.9.1",
"electron-serve": "^1.1.0",
"electron-store": "^7.0.0",
"eslint": "^7.18.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-react": "^7.22.0",

View File

@ -1,7 +1,7 @@
module.exports = {
rootDir: '../',
transform: {
'^.+\\.[t|j]sx?$': ['babel-jest', { configFile: './tests/babel.config.js' }]
'^.+\\.[t|j]sx?$': ['babel-jest']
},
moduleNameMapper: {
'.+\\.(css|styl|less|sass|scss)$': 'identity-obj-proxy',