diff --git a/browser.js b/browser.js index 7f3792d..6c3420f 100644 --- a/browser.js +++ b/browser.js @@ -4,5 +4,6 @@ module.exports = { plugins: ['compat'], rules: { 'compat/compat': 'warn', + 'no-console': 'warn', }, } diff --git a/index.js b/index.js index 4c53ce7..87da743 100644 --- a/index.js +++ b/index.js @@ -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', @@ -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', @@ -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', diff --git a/node.js b/node.js index 5dc9953..6005a40 100644 --- a/node.js +++ b/node.js @@ -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' }, } diff --git a/package.json b/package.json index 46173dc..e3d913a 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/react.js b/react.js new file mode 100644 index 0000000..6235497 --- /dev/null +++ b/react.js @@ -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', + }, + } + \ No newline at end of file