mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update eslint config
This commit is contained in:
+39
-11
@@ -2,36 +2,64 @@ module.exports = {
|
|||||||
extends: [
|
extends: [
|
||||||
'airbnb-typescript',
|
'airbnb-typescript',
|
||||||
'airbnb/hooks',
|
'airbnb/hooks',
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'plugin:jest/recommended',
|
'plugin:jest/recommended',
|
||||||
'plugin:prettier/recommended'
|
'plugin:prettier/recommended',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
],
|
],
|
||||||
plugins: ['react', '@typescript-eslint', 'jest'],
|
plugins: ['react', '@typescript-eslint', 'jest', 'prettier'],
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
jest: true
|
jest: true,
|
||||||
},
|
},
|
||||||
globals: {
|
globals: {
|
||||||
Atomics: 'readonly',
|
Atomics: 'readonly',
|
||||||
SharedArrayBuffer: 'readonly'
|
SharedArrayBuffer: 'readonly',
|
||||||
},
|
},
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaFeatures: {
|
ecmaFeatures: {
|
||||||
jsx: true
|
jsx: true,
|
||||||
},
|
},
|
||||||
ecmaVersion: 2018,
|
ecmaVersion: 2018,
|
||||||
sourceType: 'module',
|
sourceType: 'module',
|
||||||
project: './tsconfig.json'
|
project: './tsconfig.json',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
'no-nested-ternary': 'off',
|
||||||
|
'no-unused-expressions': 'off',
|
||||||
|
'@typescript-eslint/no-unused-expressions': [
|
||||||
|
'warn',
|
||||||
|
{ allowShortCircuit: true, allowTernary: true },
|
||||||
|
],
|
||||||
|
'react-hooks/exhaustive-deps': 1,
|
||||||
|
'import/no-cycle': 'off',
|
||||||
|
'react/jsx-props-no-spreading': 'off',
|
||||||
|
'import/prefer-default-export': 'off',
|
||||||
|
'no-prototype-builtins': 'off',
|
||||||
|
'no-plusplus': 'off',
|
||||||
|
'@typescript-eslint/no-use-before-define': 'off',
|
||||||
|
'react/prop-types': 'off',
|
||||||
|
'react/react-in-jsx-scope': 'off',
|
||||||
|
'@typescript-eslint/camelcase': 'off',
|
||||||
|
'@typescript-eslint/explicit-function-return-type': 0,
|
||||||
|
'@typescript-eslint/explicit-module-boundary-types': 0,
|
||||||
'linebreak-style': 'off',
|
'linebreak-style': 'off',
|
||||||
|
'jsx-a11y/label-has-associated-control': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
labelComponents: [],
|
||||||
|
labelAttributes: [],
|
||||||
|
controlComponents: [],
|
||||||
|
assert: 'either',
|
||||||
|
depth: 25,
|
||||||
|
},
|
||||||
|
],
|
||||||
'prettier/prettier': [
|
'prettier/prettier': [
|
||||||
'error',
|
'error',
|
||||||
{
|
{
|
||||||
endOfLine: 'auto'
|
endOfLine: 'auto',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-9
@@ -27,15 +27,7 @@
|
|||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject",
|
"eject": "react-scripts eject",
|
||||||
"generate": "graphql-codegen --config codegen.yml",
|
"generate": "graphql-codegen --config codegen.yml"
|
||||||
"format": "prettier --write src/**/*.ts{,x}",
|
|
||||||
"lint": "tsc --noEmit && eslint src/**/*.ts{,x}"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": [
|
|
||||||
"react-app",
|
|
||||||
"react-app/jest"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|||||||
Reference in New Issue
Block a user