@corva/eslint-config-browser
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -6,36 +6,54 @@ module.exports = { | ||
rules: { | ||
'react/jsx-uses-react': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'class-methods-use-this': 'off', | ||
'comma-dangle': ['error', 'only-multiline'], | ||
'implicit-arrow-linebreak': 'off', | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'import/prefer-default-export': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
'import/no-unresolved': 'off', | ||
'import/extensions': 'off', | ||
'react/jsx-filename-extension': [ | ||
// TODO: Setup linebreaks from CRLF to LF on Windows machines | ||
'linebreak-style': 'off', | ||
'max-len': 'off', | ||
'no-console': [ | ||
'warn', | ||
{ | ||
allow: ['error'], | ||
}, | ||
], | ||
'no-else-return': 'off', | ||
'no-extend-native': [ | ||
'error', | ||
{ | ||
extensions: ['.js', '.jsx'], | ||
exceptions: ['Number'], | ||
}, | ||
], | ||
'react/prop-types': [ | ||
'no-shadow': 'off', | ||
'no-underscore-dangle': ['error', { allow: ['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'] }], | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
ignore: ['router', 'params', 'location', 'classes'], | ||
args: 'after-used', | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
'react/no-did-update-set-state': 'off', | ||
'operator-linebreak': 'off', | ||
'react-hooks/exhaustive-deps': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react/button-has-type': 'off', | ||
'react/destructuring-assignment': 'off', | ||
// NOTE: Block below was disabled after update to ESLint 5 | ||
'react/jsx-curly-newline': 'off', | ||
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }], | ||
'react/jsx-one-expression-per-line': 'off', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/jsx-tag-spacing': 'off', | ||
'react/jsx-uses-react': 'off', | ||
'react/jsx-wrap-multilines': 'off', | ||
'react/no-access-state-in-setstate': 'off', | ||
'react/no-did-update-set-state': 'off', | ||
'react/no-this-in-sfc': 'off', | ||
'react/prop-types': ['error', { ignore: ['router', 'params', 'location', 'classes'] }], | ||
'react/react-in-jsx-scope': 'off', | ||
'react/sort-comp': 'off', | ||
'react/button-has-type': 'off', | ||
'react/jsx-one-expression-per-line': 'off', | ||
'react/jsx-wrap-multilines': 'off', | ||
'react/jsx-tag-spacing': 'off', | ||
'operator-linebreak': 'off', | ||
'no-else-return': 'off', | ||
'implicit-arrow-linebreak': 'off', | ||
'comma-dangle': ['error', 'only-multiline'], | ||
'max-len': 'off', | ||
camelcase: ['error', { allow: ['^UNSAFE_'], properties: 'never', ignoreDestructuring: true }], | ||
// NOTE: Accessibility rules | ||
'jsx-a11y/anchor-is-valid': [ | ||
@@ -49,34 +67,5 @@ 'error', | ||
], | ||
camelcase: [ | ||
'error', | ||
{ | ||
allow: ['^UNSAFE_'], | ||
properties: 'never', | ||
ignoreDestructuring: true, | ||
}, | ||
], | ||
'class-methods-use-this': 'off', | ||
'no-console': [ | ||
'warn', | ||
{ | ||
allow: ['error'], | ||
}, | ||
], | ||
'no-underscore-dangle': [ | ||
'error', | ||
{ | ||
allow: ['__REDUX_DEVTOOLS_EXTENSION_COMPOSE__'], | ||
}, | ||
], | ||
'no-extend-native': [ | ||
'error', | ||
{ | ||
exceptions: ['Number'], | ||
}, | ||
], | ||
// TODO: Setup linebreaks from CRLF to LF on Windows machines | ||
'linebreak-style': 'off', | ||
// NOTE: Accessibility rules | ||
'jsx-a11y/click-events-have-key-events': 'off', | ||
'jsx-a11y/control-has-associated-label': 'off', | ||
'jsx-a11y/no-static-element-interactions': 'off', | ||
'jsx-a11y/click-events-have-key-events': 'off', | ||
}, | ||
@@ -88,9 +77,9 @@ env: { | ||
// Specs | ||
afterEach: true, | ||
beforeEach: true, | ||
describe: true, | ||
expect: true, | ||
it: true, | ||
expect: true, | ||
describe: true, | ||
jest: true, | ||
beforeEach: true, | ||
afterEach: true, | ||
}, | ||
}; |
{ | ||
"name": "@corva/eslint-config-browser", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Defines global linting rules for Corva.AI frontend projects", | ||
@@ -31,2 +31,3 @@ "keywords": [ | ||
"@babel/eslint-parser": "^7.13.10", | ||
"eslint": "^7.22.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
@@ -38,3 +39,4 @@ "eslint-config-prettier": "^6.4.0", | ||
"eslint-plugin-react": "^7.11.1", | ||
"eslint-plugin-react-hooks": "^4.2.0" | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"prettier": "^2.0.0" | ||
}, | ||
@@ -45,21 +47,6 @@ "devDependencies": { | ||
"conventional-changelog-cli": "^2.0.34", | ||
"eslint": "^7.22.0", | ||
"husky": "^4.2.5", | ||
"prettier": "^2.0.0", | ||
"pretty-quick": "^2.0.0", | ||
"standard-version": "^8.0.0" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.13.10", | ||
"@babel/eslint-parser": "^7.13.10", | ||
"eslint": "^7.2.0", | ||
"eslint-config-airbnb": "^18.2.1", | ||
"eslint-config-prettier": "^6.4.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jsx-a11y": "^6.4.1", | ||
"eslint-plugin-prettier": "3.1.1", | ||
"eslint-plugin-react": "^7.11.1", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"prettier": "^2.0.0" | ||
}, | ||
"publishConfig": { | ||
@@ -66,0 +53,0 @@ "registry": "https://registry.npmjs.org" |
11
6
4499
89
+ Addedeslint@^7.22.0
+ Addedprettier@^2.0.0