Skip to content

Commit

Permalink
all: update ruleset, tidy deps, add react config
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemolland committed Jun 16, 2022
1 parent 126b221 commit 8130346
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
1 change: 1 addition & 0 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ module.exports = {
plugins: ['compat'],
rules: {
'compat/compat': 'warn',
'no-console': 'warn',
},
}
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
env: { es2021: true },
extends: ['eslint:recommended'],
plugins: ['import', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: { impliedStrict: true },
sourceType: 'module',
Expand All @@ -27,7 +28,6 @@ module.exports = {
],
'no-sequences': 'warn',
'no-unused-vars': 'warn',
'no-console': 'warn',
'no-empty': 'warn',
'no-nested-ternary': 'warn',
'no-useless-escape': 'warn',
Expand Down Expand Up @@ -71,8 +71,6 @@ module.exports = {
'quote-props': ['warn', 'consistent-as-needed'],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['warn', 'never'],
'sort-keys': 'warn',
'sort-vars': 'warn',
'space-before-blocks': 'warn',
'space-before-function-paren': ['warn', { named: 'never' }],
'space-in-parens': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
env: { node: true },
extends: ['@gameflow-tv/eslint-config', 'plugin:node/recommended'],
rules: { 'node/no-mixed-requires': 'warn' },
rules: { 'node/no-mixed-requires': 'warn', 'no-console': 'off' },
}
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@
"index.js",
"browser.js",
"jest.js",
"node.js"
"node.js",
"react.js"
],
"peerDependencies": {
"eslint-plugin-import": "^2.26.0",
"eslint": ">= 8",
"dependencies": {
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0"
"@typescript-eslint/parser": "^5.26.0",
"eslint-plugin-import": "^2.26.0"
},
"peerDependencies": {
"eslint": ">= 8"
},
"optionalDependencies": {
"eslint-plugin-compat": ">= 3",
"eslint-plugin-jest": ">= 26",
"eslint-plugin-node": ">=11",
"eslint-plugin-react": ">= 7",
"eslint-plugin-react-hooks": ">= 4"
"eslint-plugin-react-hooks": ">= 4",
"eslint-config-react-app": ">= 7",
"eslint-plugin-jsx-a11y": ">= 6"
}
}
10 changes: 10 additions & 0 deletions react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
env: { browser: true },
extends: ['@gameflow-tv/eslint-config', 'react-app', 'jsx-a11y:recommended'],
plugins: ['compat', 'jsx-a11y'],
rules: {
'compat/compat': 'warn',
'no-console': 'warn',
},
}

0 comments on commit 8130346

Please sign in to comment.