@amedia/eslint-config-react
Advanced tools
Comparing version 0.0.0-20240206173406 to 0.0.0-flatconf-20241107121126
# @amedia/eslint-config-react | ||
## 0.0.0-20240206173406 | ||
## 0.0.0-flatconf-20241107121126 | ||
### Major Changes | ||
- a4e7dd9: break out eslint-config-prettier to its own package | ||
- b75c21c: configuration overhaul | ||
this migrates all configuration to ESM where applicable, this causes | ||
breaking changes for configuration files. | ||
there are no cli changes. | ||
E.g. new eslint configuration file is: | ||
eslint.config.js | ||
And looks like: | ||
``` | ||
import eslintConfig from '@amedia/eslint-config'; | ||
export default eslintConfig(); | ||
``` | ||
An object can be passed to `eslintConfig()` to enable or disable project | ||
configuration. | ||
- cc0bb37: break out eslint-config-prettier to its own package | ||
### Patch Changes | ||
- 73ba203: add recommended eslint config for eslintrc | ||
- Updated dependencies [fe27843] | ||
- Updated dependencies [a4e7dd9] | ||
- Updated dependencies [73ba203] | ||
- @amedia/eslint-config-base@0.0.0-20240206173406 | ||
- eee534f: add recommended eslint config for eslintrc | ||
- Updated dependencies [b75c21c] | ||
- Updated dependencies [85cf4db] | ||
- Updated dependencies [cc0bb37] | ||
- Updated dependencies [eee534f] | ||
- @amedia/eslint-config-base@0.0.0-flatconf-20241107121126 | ||
@@ -17,0 +40,0 @@ ## 7.0.4 |
75
index.js
@@ -1,65 +0,20 @@ | ||
import path from 'node:path'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { FlatCompat } from '@eslint/eslintrc'; | ||
import eslintConfigBase from '@amedia/eslint-config-base'; | ||
import jsxA11y from 'eslint-plugin-jsx-a11y'; | ||
import reactPlugin from 'eslint-plugin-react'; | ||
const __filename = fileURLToPath(import.meta.url); | ||
const __dirname = path.dirname(__filename); | ||
const compat = new FlatCompat({ | ||
recommendedConfig: eslintConfigBase, | ||
baseDirectory: __dirname, | ||
resolvePluginsRelativeTo: __dirname, | ||
}); | ||
export default compat.config({ | ||
extends: [ | ||
'plugin:jsx-a11y/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
'shared-node-browser': true, | ||
}, | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
defaultParams: true, | ||
spread: true, | ||
export default [ | ||
{ | ||
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'], | ||
...jsxA11y.flatConfigs.recommended, | ||
languageOptions: { | ||
...jsxA11y.flatConfigs.recommended.languageOptions, | ||
}, | ||
}, | ||
rules: { | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'error', | ||
'react/jsx-curly-brace-presence': [ | ||
2, | ||
{ props: 'never', children: 'never' }, | ||
], | ||
'react/jsx-filename-extension': 0, | ||
'react/sort-comp': 2, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['./src/**/*.test.js', './src/**/*.spec.js'], | ||
globals: { | ||
React: true, | ||
}, | ||
rules: { | ||
'global-require': 0, | ||
'import/no-extraneous-dependencies': 0, | ||
'max-classes-per-file': 0, | ||
'no-console': 0, | ||
}, | ||
{ | ||
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'], | ||
...reactPlugin.configs.flat.recommended, | ||
languageOptions: { | ||
...reactPlugin.configs.flat.recommended.languageOptions, | ||
}, | ||
], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx'], | ||
}, | ||
}, | ||
}, | ||
}); | ||
reactPlugin.configs.flat['jsx-runtime'], | ||
]; |
{ | ||
"name": "@amedia/eslint-config-react", | ||
"version": "0.0.0-20240206173406", | ||
"version": "0.0.0-flatconf-20241107121126", | ||
"description": "ESLint react configuration to be used by developers at Amedia", | ||
@@ -9,3 +9,3 @@ "type": "module", | ||
".": { | ||
"import": "index.js" | ||
"import": "./index.js" | ||
} | ||
@@ -32,10 +32,10 @@ }, | ||
"peerDependencies": { | ||
"eslint": "8.x" | ||
"eslint": "9.x" | ||
}, | ||
"dependencies": { | ||
"@amedia/eslint-config-base": "0.0.0-20240206173406", | ||
"@amedia/eslint-config-base": "0.0.0-flatconf-20241107121126", | ||
"@eslint/eslintrc": "3.0.0", | ||
"eslint-plugin-jsx-a11y": "6.5.1", | ||
"eslint-plugin-react": "7.29.4", | ||
"eslint-plugin-react-hooks": "4.4.0" | ||
"eslint-plugin-jsx-a11y": "6.10.2", | ||
"eslint-plugin-react": "7.37.2", | ||
"eslint-plugin-react-hooks": "5.0.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8036
19
+ Added@amedia/eslint-config-base@0.0.0-flatconf-20241107121126(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@eslint/config-array@0.19.1(transitive)
+ Added@eslint/core@0.10.0(transitive)
+ Added@eslint/eslintrc@3.2.0(transitive)
+ Added@eslint/js@9.18.0(transitive)
+ Added@eslint/object-schema@2.1.5(transitive)
+ Added@eslint/plugin-kit@0.2.5(transitive)
+ Added@humanfs/core@0.19.1(transitive)
+ Added@humanfs/node@0.16.6(transitive)
+ Added@humanwhocodes/retry@0.3.10.4.1(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@types/json-schema@7.0.15(transitive)
+ Added@types/normalize-package-data@2.4.4(transitive)
+ Added@typescript-eslint/scope-manager@8.20.0(transitive)
+ Added@typescript-eslint/types@8.20.0(transitive)
+ Added@typescript-eslint/typescript-estree@8.20.0(transitive)
+ Added@typescript-eslint/utils@8.20.0(transitive)
+ Added@typescript-eslint/visitor-keys@8.20.0(transitive)
+ Addedaria-query@5.3.2(transitive)
+ Addedarray.prototype.findlast@1.2.5(transitive)
+ Addedarray.prototype.tosorted@1.1.4(transitive)
+ Addedast-types-flow@0.0.8(transitive)
+ Addedaxobject-query@4.1.0(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedbrowserslist@4.24.4(transitive)
+ Addedbuiltin-modules@3.3.0(transitive)
+ Addedcaniuse-lite@1.0.30001692(transitive)
+ Addedci-info@4.1.0(transitive)
+ Addedclean-regexp@1.0.0(transitive)
+ Addedcore-js-compat@3.40.0(transitive)
+ Addedelectron-to-chromium@1.5.80(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedes-iterator-helpers@1.2.1(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedeslint@9.18.0(transitive)
+ Addedeslint-plugin-jsx-a11y@6.10.2(transitive)
+ Addedeslint-plugin-perfectionist@3.9.1(transitive)
+ Addedeslint-plugin-react@7.37.2(transitive)
+ Addedeslint-plugin-react-hooks@5.0.0(transitive)
+ Addedeslint-plugin-unicorn@56.0.0(transitive)
+ Addedeslint-scope@8.2.0(transitive)
+ Addedeslint-visitor-keys@4.2.0(transitive)
+ Addedespree@10.3.0(transitive)
+ Addedfast-glob@3.3.3(transitive)
+ Addedfile-entry-cache@8.0.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedflat-cache@4.0.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobals@14.0.015.14.0(transitive)
+ Addedhosted-git-info@2.8.9(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedis-builtin-module@3.2.1(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addediterator.prototype@1.1.5(transitive)
+ Addedjsesc@0.5.03.1.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedmin-indent@1.0.1(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addednatural-compare-lite@1.4.0(transitive)
+ Addednode-releases@2.0.19(transitive)
+ Addednormalize-package-data@2.5.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpluralize@8.0.0(transitive)
+ Addedread-pkg@5.2.0(transitive)
+ Addedread-pkg-up@7.0.1(transitive)
+ Addedregexp-tree@0.1.27(transitive)
+ Addedregjsparser@0.10.0(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedsemver@5.7.27.6.3(transitive)
+ Addedspdx-correct@3.2.0(transitive)
+ Addedspdx-exceptions@2.5.0(transitive)
+ Addedspdx-expression-parse@3.0.1(transitive)
+ Addedspdx-license-ids@3.0.20(transitive)
+ Addedstring.prototype.includes@2.0.1(transitive)
+ Addedstring.prototype.repeat@1.0.0(transitive)
+ Addedstrip-indent@3.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedts-api-utils@2.0.0(transitive)
+ Addedtype-fest@0.6.00.8.1(transitive)
+ Addedtypescript@5.7.3(transitive)
+ Addedupdate-browserslist-db@1.1.2(transitive)
+ Addedvalidate-npm-package-license@3.0.4(transitive)
- Removed@amedia/eslint-config-base@0.0.0-20240206173406(transitive)
- Removed@babel/runtime@7.26.0(transitive)
- Removed@babel/runtime-corejs3@7.26.0(transitive)
- Removed@eslint/eslintrc@2.1.4(transitive)
- Removed@eslint/js@8.57.1(transitive)
- Removed@humanwhocodes/config-array@0.13.0(transitive)
- Removed@humanwhocodes/object-schema@2.0.3(transitive)
- Removed@ungap/structured-clone@1.2.1(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedaria-query@4.2.2(transitive)
- Removedast-types-flow@0.0.7(transitive)
- Removedaxobject-query@2.2.0(transitive)
- Removedcore-js-pure@3.40.0(transitive)
- Removeddoctrine@3.0.0(transitive)
- Removedeslint@8.57.1(transitive)
- Removedeslint-plugin-jsx-a11y@6.5.1(transitive)
- Removedeslint-plugin-react@7.29.4(transitive)
- Removedeslint-plugin-react-hooks@4.4.0(transitive)
- Removedeslint-scope@7.2.2(transitive)
- Removedfile-entry-cache@6.0.1(transitive)
- Removedflat-cache@3.2.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedgraphemer@1.4.0(transitive)
- Removedhas@1.0.4(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-path-inside@3.0.3(transitive)
- Removedobject.hasown@1.1.4(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedtext-table@0.2.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updated@amedia/eslint-config-base@0.0.0-flatconf-20241107121126
Updatedeslint-plugin-react@7.37.2