@anolilab/eslint-config 11.2.1 → 11.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +5 -3
- package/dist/config/plugins/import.js +1 -1
- package/dist/config/plugins/import.js.map +1 -1
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## @anolilab/eslint-config [11.2.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.2.2...@anolilab/eslint-config@11.2.3) (2023-08-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* upgrade project dependencies to latest versions ([340ff87](https://github.com/anolilab/javascript-style-guide/commit/340ff87dfe01ca4c7a21536c26c6dd703afc62f7))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* **deps:** update dependency eslint-plugin-cypress to ^2.14.0 ([#727](https://github.com/anolilab/javascript-style-guide/issues/727)) ([75296ea](https://github.com/anolilab/javascript-style-guide/commit/75296eaeb1a271597a7d309c5ae7ba52cb3b7889))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* **@anolilab/package-json-utils:** upgraded to 3.0.4
|
|
18
|
+
* **@anolilab/semantic-release-preset:** upgraded to 6.0.4
|
|
19
|
+
|
|
20
|
+
## @anolilab/eslint-config [11.2.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.2.1...@anolilab/eslint-config@11.2.2) (2023-08-08)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* update dependencies and improve installation instructions ([b4830c0](https://github.com/anolilab/javascript-style-guide/commit/b4830c00f0d222a3bf895476ac82d7e617c46e14))
|
|
26
|
+
|
|
1
27
|
## @anolilab/eslint-config [11.2.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.2.0...@anolilab/eslint-config@11.2.1) (2023-08-04)
|
|
2
28
|
|
|
3
29
|
|
package/README.md
CHANGED
|
@@ -49,16 +49,18 @@ In summary, our package provides comprehensive and adaptable ESLint configuratio
|
|
|
49
49
|
|
|
50
50
|
To install this config, run the following command.
|
|
51
51
|
|
|
52
|
+
> Note: `eslint-plugin-import@npm:eslint-plugin-i` is needed to use the correct package.
|
|
53
|
+
|
|
52
54
|
```bash
|
|
53
|
-
npm install --save-dev eslint @anolilab/eslint-config
|
|
55
|
+
npm install --save-dev eslint @anolilab/eslint-config eslint-plugin-import@npm:eslint-plugin-i@latest
|
|
54
56
|
```
|
|
55
57
|
|
|
56
58
|
```sh
|
|
57
|
-
pnpm add -D eslint @anolilab/eslint-config
|
|
59
|
+
pnpm add -D eslint @anolilab/eslint-config eslint-plugin-import@npm:eslint-plugin-i@latest
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
```sh
|
|
61
|
-
yarn add -D eslint @anolilab/eslint-config
|
|
63
|
+
yarn add -D eslint @anolilab/eslint-config eslint-plugin-import@npm:eslint-plugin-i@latest
|
|
62
64
|
```
|
|
63
65
|
|
|
64
66
|
## Usage
|
|
@@ -4,7 +4,7 @@ var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
|
|
|
4
4
|
require('../../chunk-MFE6DF6Y.js');
|
|
5
5
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
6
6
|
|
|
7
|
-
var t=chunkWG6GTAIA_js.b([{config:{env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],rules:{"import/consistent-type-specifier-style":["error","prefer-top-level"],"import/default":"off","import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/export":"error","import/exports-last":"error","import/extensions":["error","ignorePackages",{cjs:"never",js:"never",jsx:"never",mjs:"never"}],"import/first":"error","import/group-exports":"off","import/imports-first":"off","import/max-dependencies":["off",{max:10}],"import/named":"error","import/namespace":"off","import/newline-after-import":"error","import/no-absolute-path":"error","import/no-amd":"error","import/no-anonymous-default-export":["off",{allowAnonymousClass:!1,allowAnonymousFunction:!1,allowArray:!1,allowArrowFunction:!1,allowLiteral:!1,allowObject:!1}],"import/no-commonjs":"off","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-default-export":"off","import/no-deprecated":"off","import/no-duplicates":"error","import/no-dynamic-require":"error","import/no-empty-named-blocks":"error","import/no-extraneous-dependencies":["error",{devDependencies:["test/**","tests/**","spec/**","**/fixture/**","**/__mocks__/**","test.{js,jsx}","test-*.{js,jsx}","**/*{.,_}{test,spec}.{js,jsx}","**/jest.config.cjs","**/jest.setup.js","**/vue.config.cjs","**/webpack.config.cjs","**/webpack.config.*.js","**/rollup.config.cjs","**/rollup.config.*.js","**/gulpfile.js","**/gulpfile.*.js","**/Gruntfile{,.js}","**/protractor.conf.js","**/protractor.conf.*.js","**/karma.conf.js","**/.eslintrc.js","**/.eslintrc.cjs","**/.eslintrc.mjs","**/vite.config.js","**/vite.config.ts","**/vitest.config.js","**/vitest.config.ts","**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],optionalDependencies:!1}],"import/no-internal-modules":["off",{allow:[]}],"import/no-mutable-exports":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-named-default":"error","import/no-named-export":"off","import/no-namespace":"error","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-restricted-paths":"off","import/no-self-import":"error","import/no-unassigned-import":"off","import/no-unresolved":["error",{caseSensitive:!0,commonjs:!0}],"import/no-unused-modules":"off","import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/no-webpack-loader-syntax":"error","import/order":["error",{groups:[["builtin","external","internal"]]}],"import/prefer-default-export":"error","import/unambiguous":"off"},settings:{"import/core-modules":[],"import/extensions":[".js",".cjs",".mjs",".jsx"],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"],"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...packageJsonUtils.hasTypescript?{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}:{}}}},type:"all"},{config:{extends:["plugin:import/typescript"],rules:{"import/default":"off","import/export":"off","import/extensions":["error","ignorePackages",{js:"never",jsx:"never",mjs:"never",ts:"never",tsx:"never"}],"import/named":"off","import/no-unresolved":"off"},settings:{"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts",".cjs",".cts",".mts"],"import/external-module-folders":["node_modules","node_modules/@types"],"import/parsers":{"@typescript-eslint/parser":[".ts",".cts",".mts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}}}},type:"typescript"},{config:{rules:{"import/no-duplicates":"off"}},type:"d.ts"}]),i=t;
|
|
7
|
+
var t=chunkWG6GTAIA_js.b([{config:{env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],rules:{"import/consistent-type-specifier-style":["error","prefer-top-level"],"import/default":"off","import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/export":"error","import/exports-last":"error","import/extensions":["error","ignorePackages",{cjs:"never",js:"never",jsx:"never",mjs:"never"}],"import/first":"error","import/group-exports":"off","import/imports-first":"off","import/max-dependencies":["off",{max:10}],"import/named":"error","import/namespace":"off","import/newline-after-import":"error","import/no-absolute-path":"error","import/no-amd":"error","import/no-anonymous-default-export":["off",{allowAnonymousClass:!1,allowAnonymousFunction:!1,allowArray:!1,allowArrowFunction:!1,allowLiteral:!1,allowObject:!1}],"import/no-commonjs":"off","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-default-export":"off","import/no-deprecated":"off","import/no-duplicates":"error","import/no-dynamic-require":"error","import/no-empty-named-blocks":"error","import/no-extraneous-dependencies":["error",{devDependencies:["test/**","tests/**","spec/**","**/fixture/**","**/__mocks__/**","test.{js,jsx}","test-*.{js,jsx}","**/*{.,_}{test,spec}.{js,jsx}","**/jest.config.cjs","**/jest.setup.js","**/vue.config.cjs","**/webpack.config.cjs","**/webpack.config.*.js","**/rollup.config.cjs","**/rollup.config.*.js","**/gulpfile.js","**/gulpfile.*.js","**/Gruntfile{,.js}","**/protractor.conf.js","**/protractor.conf.*.js","**/karma.conf.js","**/.eslintrc.js","**/.eslintrc.cjs","**/.eslintrc.mjs","**/vite.config.js","**/vite.config.ts","**/vitest.config.js","**/vitest.config.ts","**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],optionalDependencies:!1}],"import/no-internal-modules":["off",{allow:[]}],"import/no-mutable-exports":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-named-default":"error","import/no-named-export":"off","import/no-namespace":"error","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-restricted-paths":"off","import/no-self-import":"error","import/no-unassigned-import":"off","import/no-unresolved":["error",{caseSensitive:!0,commonjs:!0}],"import/no-unused-modules":"off","import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/no-webpack-loader-syntax":"error","import/order":["error",{groups:[["builtin","external","internal"]]}],"import/prefer-default-export":"error","import/unambiguous":"off"},settings:{"import/core-modules":[],"import/extensions":[".js",".cjs",".mjs",".jsx"],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"],"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...packageJsonUtils.hasTypescript?{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}:{}}}},type:"all"},{config:{extends:["plugin:import/typescript"],rules:{"import/default":"off","import/export":"off","import/extensions":["error","ignorePackages",{js:"never",jsx:"never",mjs:"never",ts:"never",tsx:"never"}],"import/named":"off","import/no-unresolved":"off"},settings:{"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts",".cjs",".cts",".mts"],"import/external-module-folders":["node_modules","node_modules/@types"],"import/parsers":{"@typescript-eslint/parser":[".ts",".cts",".mts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]},typescript:!0}}},type:"typescript"},{config:{rules:{"import/no-duplicates":"off"}},type:"d.ts"}]),i=t;
|
|
8
8
|
|
|
9
9
|
module.exports = i;
|
|
10
10
|
//# sourceMappingURL=out.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/import.ts"],"names":["fromRoot","hasTypescript","config","createConfigs","import_default"],"mappings":"4EAAA,OAAS,YAAAA,EAAU,iBAAAC,MAAqB,+BAIxC,IAAMC,EAAwBC,EAAc,CACxC,CACI,OAAQ,CACJ,IAAK,CACD,IAAK,EACT,EAEA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,EACA,QAAS,CAAC,QAAQ,EAClB,MAAO,CAKH,yCAA0C,CAAC,QAAS,kBAAkB,EAItE,iBAAkB,MAIlB,kCAAmC,CAC/B,MACA,CACI,gBAAiB,CAAC,EAClB,uBAAwB,kBAC5B,CACJ,EAGA,gBAAiB,QAMjB,sBAAuB,QAIvB,oBAAqB,CACjB,QACA,iBACA,CACI,IAAK,QACL,GAAI,QACJ,IAAK,QACL,IAAK,OACT,CACJ,EAIA,eAAgB,QAIhB,uBAAwB,MAKxB,uBAAwB,MAIxB,0BAA2B,CAAC,MAAO,CAAE,IAAK,EAAG,CAAC,EAM9C,eAAgB,QAIhB,mBAAoB,MAIpB,8BAA+B,QAM/B,0BAA2B,QAK3B,gBAAiB,QAIjB,qCAAsC,CAClC,MACA,CACI,oBAAqB,GACrB,uBAAwB,GACxB,WAAY,GACZ,mBAAoB,GACpB,aAAc,GACd,YAAa,EACjB,CACJ,EAIA,qBAAsB,MAItB,kBAAmB,CAAC,QAAS,CAAE,SAAU,QAAI,CAAC,EAK9C,2BAA4B,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CACI,GAAI,QACJ,IAAK,QACL,IAAK,QACL,GAAI,QACJ,IAAK,OACT,CACJ,EAGA,eAAgB,MAGhB,uBAAwB,KAC5B,EACA,SAAU,CAEN,oBAAqB,CAAC,MAAO,OAAQ,OAAQ,MAAO,OAAQ,QAAS,OAAQ,OAAQ,MAAM,EAG3F,iCAAkC,CAAC,eAAgB,qBAAqB,EAGxE,iBAAkB,CACd,4BAA6B,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAO,CACxE,EAGA,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,OAAQ,MAAO,QAAS,MAAO,OAAO,CAC/D,CACJ,CACJ,CACJ,EACA,KAAM,YACV,EACA,CACI,OAAQ,CACJ,MAAO,CACH,uBAAwB,KAC5B,CACJ,EACA,KAAM,MACV,CACJ,CAAC,EAEMI,EAAQF","sourcesContent":["import { fromRoot, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { createConfigs } from \"../../utils/create-config\";\n\nconst config: Linter.Config = createConfigs([\n {\n config: {\n env: {\n es6: true,\n },\n\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n rules: {\n // Static analysis:\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n \"import/consistent-type-specifier-style\": [\"error\", \"prefer-top-level\"],\n\n // ensure named imports coupled with named exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it\n \"import/default\": \"off\",\n\n // ensure default import coupled with default export\n // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md\n \"import/dynamic-import-chunkname\": [\n \"off\",\n {\n importFunctions: [],\n webpackChunknameFormat: \"[0-9a-zA-Z-_/.]+\",\n },\n ],\n\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md\n \"import/export\": \"error\",\n\n // Helpful warnings:\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\n\n // do not allow a default import name to match a named export\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n cjs: \"never\",\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n },\n ],\n\n // warn on accessing default export property names that are also named exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md\n \"import/first\": \"error\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // Forbid the use of extraneous packages\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // Forbid mutable exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // Module systems:\n\n // disallow require()\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it\n \"import/named\": \"error\",\n\n // disallow AMD require/define\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // No Node.js builtin modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md\n \"import/newline-after-import\": \"error\",\n\n // Style guide:\n\n // disallow non-import statements appearing before import statements\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // disallow non-import statements appearing before import statements\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // disallow duplicate imports\n // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md\n \"import/no-anonymous-default-export\": [\n \"off\",\n {\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowArray: false,\n allowArrowFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\n\n // disallow namespace imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md\n \"import/no-commonjs\": \"off\",\n\n // Ensure consistent use of file extension within the import path\n // https://medium.com/@steven-lemon182/are-typescript-barrel-files-an-anti-pattern-72a713004250\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // ensure absolute imports are above relative imports and that unassigned imports are ignored\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // Require a newline after the last import/require in a group\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"off\",\n\n // Require modules with a single export to use a default export\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // Restrict which files can be imported in a given folder\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // Forbid modules to have too many dependencies\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n\n // Forbid import of modules using absolute paths\n // are treated both as absolute paths, and relative to process.cwd()\n \"import/no-extraneous-dependencies\": [\n \"error\",\n {\n devDependencies: [\n \"test/**\", // tape, common npm pattern\n \"tests/**\", // also common npm pattern\n \"spec/**\", // mocha, rspec-like pattern\n \"**/fixture/**\", // jest pattern\n \"**/__mocks__/**\", // jest pattern\n \"test.{js,jsx}\", // repos with a single test file\n \"test-*.{js,jsx}\", // repos with multiple top-level test files\n \"**/*{.,_}{test,spec}.{js,jsx}\", // tests where the extension or filename suffix denotes that it is a test\n \"**/jest.config.cjs\", // jest config\n \"**/jest.setup.js\", // jest setup\n \"**/vue.config.cjs\", // vue-cli config\n \"**/webpack.config.cjs\", // webpack config\n \"**/webpack.config.*.js\", // webpack config\n \"**/rollup.config.cjs\", // rollup config\n \"**/rollup.config.*.js\", // rollup config\n \"**/gulpfile.js\", // gulp config\n \"**/gulpfile.*.js\", // gulp config\n \"**/Gruntfile{,.js}\", // grunt config\n \"**/protractor.conf.js\", // protractor config\n \"**/protractor.conf.*.js\", // protractor config\n \"**/karma.conf.js\", // karma config\n \"**/.eslintrc.js\", // eslint config\n \"**/.eslintrc.cjs\", // eslint config\n \"**/.eslintrc.mjs\", // eslint config\n \"**/vite.config.js\", // vite config\n \"**/vite.config.ts\", // vite config\n \"**/vitest.config.js\", // vitest config\n \"**/vitest.config.ts\", // vitest config\n \"**/__tests__/**/*.?(c|m)[jt]s?(x)\", // vitest config test include\n \"**/?(*.){test,spec}.?(c|m)[jt]s?(x)\", // vitest config test include\n ],\n optionalDependencies: false,\n },\n ],\n\n // Forbid require() calls with expressions\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md\n \"import/no-internal-modules\": [\n \"off\",\n {\n allow: [],\n },\n ],\n\n // prevent importing the submodules of other modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Warn if a module could be mistakenly parsed as a script by a consumer\n // leveraging Unambiguous JavaScript Grammar\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md\n // this should not be enabled until this proposal has at least been *presented* to TC39.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\n\n // Forbid Webpack loader syntax in imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // Prevent unassigned imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Prevent importing the default as if it were named\n // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // Reports if a module's default export is unnamed\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // This rule enforces that all exports are declared at the bottom of the file.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md\n \"import/no-nodejs-modules\": \"off\",\n\n // Reports when named exports are not grouped together in a single export declaration\n // or when multiple assignments to CommonJS const config or exports object are present\n // in a single file.\n // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md\n \"import/no-relative-parent-imports\": \"off\",\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md\n \"import/no-self-import\": \"error\",\n\n // Forbid a module from importing itself\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // Forbid cyclical dependencies between modules\n // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { caseSensitive: true, commonjs: true }],\n\n // Ensures that there are no useless path segments\n // Note: you must disable the base rule as it can report incorrect errors\n \"import/no-unused-modules\": \"off\",\n\n // dynamic imports require a leading comment with a webpackChunkName\n // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md\n \"import/no-useless-path-segments\": [\"error\", { commonjs: true, noUselessIndex: true }],\n\n // Use this rule to prevent imports to folders in relative parent paths.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md\n \"import/no-webpack-loader-syntax\": \"error\",\n\n // Reports modules without any exports, or with unused exports\n // https://github.com/benmosher/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md\n \"import/order\": [\n \"error\",\n {\n groups: [[\"builtin\", \"external\", \"internal\"]],\n },\n ],\n\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md\n \"import/prefer-default-export\": \"error\",\n\n // Reports the use of empty named import blocks.\n // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n },\n settings: {\n \"import/core-modules\": [],\n // https://github.com/un-es/eslint-plugin-i/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\".js\", \".cjs\", \".mjs\", \".jsx\"],\n // Ensure consistent use of file extension within the import path\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".js\", \".json\"],\n },\n ...(hasTypescript\n ? {\n typescript: {\n alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`\n project: fromRoot(\"tsconfig.json\"),\n },\n }\n : {}),\n },\n },\n },\n type: \"all\",\n },\n {\n config: {\n extends: [\"plugin:import/typescript\"],\n rules: {\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled because of https://github.com/benmosher/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n\n // Enforce consistent usage of type imports.\n \"import/no-unresolved\": \"off\",\n },\n settings: {\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\", \".cjs\", \".cts\", \".mts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".cts\", \".mts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n },\n },\n type: \"typescript\",\n },\n {\n config: {\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n type: \"d.ts\",\n },\n]);\n\nexport default config;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/import.ts"],"names":["fromRoot","hasTypescript","config","createConfigs","import_default"],"mappings":"4EAAA,OAAS,YAAAA,EAAU,iBAAAC,MAAqB,+BAIxC,IAAMC,EAAwBC,EAAc,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,KAAM,MACV,CACJ,CAAC,EAEMI,EAAQF","sourcesContent":["import { fromRoot, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { createConfigs } from \"../../utils/create-config\";\n\nconst config: Linter.Config = createConfigs([\n {\n config: {\n env: {\n es6: true,\n },\n\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n rules: {\n // Static analysis:\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n \"import/consistent-type-specifier-style\": [\"error\", \"prefer-top-level\"],\n\n // ensure named imports coupled with named exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it\n \"import/default\": \"off\",\n\n // ensure default import coupled with default export\n // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/dynamic-import-chunkname.md\n \"import/dynamic-import-chunkname\": [\n \"off\",\n {\n importFunctions: [],\n webpackChunknameFormat: \"[0-9a-zA-Z-_/.]+\",\n },\n ],\n\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md\n \"import/export\": \"error\",\n\n // Helpful warnings:\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/benmosher/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\n\n // do not allow a default import name to match a named export\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n cjs: \"never\",\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n },\n ],\n\n // warn on accessing default export property names that are also named exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md\n \"import/first\": \"error\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // Forbid the use of extraneous packages\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // Forbid mutable exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // Module systems:\n\n // disallow require()\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it\n \"import/named\": \"error\",\n\n // disallow AMD require/define\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // No Node.js builtin modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md\n \"import/newline-after-import\": \"error\",\n\n // Style guide:\n\n // disallow non-import statements appearing before import statements\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // disallow non-import statements appearing before import statements\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/imports-first.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // disallow duplicate imports\n // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md\n \"import/no-anonymous-default-export\": [\n \"off\",\n {\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowArray: false,\n allowArrowFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\n\n // disallow namespace imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md\n \"import/no-commonjs\": \"off\",\n\n // Ensure consistent use of file extension within the import path\n // https://medium.com/@steven-lemon182/are-typescript-barrel-files-an-anti-pattern-72a713004250\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // ensure absolute imports are above relative imports and that unassigned imports are ignored\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // Require a newline after the last import/require in a group\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"off\",\n\n // Require modules with a single export to use a default export\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // Restrict which files can be imported in a given folder\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // Forbid modules to have too many dependencies\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n\n // Forbid import of modules using absolute paths\n // are treated both as absolute paths, and relative to process.cwd()\n \"import/no-extraneous-dependencies\": [\n \"error\",\n {\n devDependencies: [\n \"test/**\", // tape, common npm pattern\n \"tests/**\", // also common npm pattern\n \"spec/**\", // mocha, rspec-like pattern\n \"**/fixture/**\", // jest pattern\n \"**/__mocks__/**\", // jest pattern\n \"test.{js,jsx}\", // repos with a single test file\n \"test-*.{js,jsx}\", // repos with multiple top-level test files\n \"**/*{.,_}{test,spec}.{js,jsx}\", // tests where the extension or filename suffix denotes that it is a test\n \"**/jest.config.cjs\", // jest config\n \"**/jest.setup.js\", // jest setup\n \"**/vue.config.cjs\", // vue-cli config\n \"**/webpack.config.cjs\", // webpack config\n \"**/webpack.config.*.js\", // webpack config\n \"**/rollup.config.cjs\", // rollup config\n \"**/rollup.config.*.js\", // rollup config\n \"**/gulpfile.js\", // gulp config\n \"**/gulpfile.*.js\", // gulp config\n \"**/Gruntfile{,.js}\", // grunt config\n \"**/protractor.conf.js\", // protractor config\n \"**/protractor.conf.*.js\", // protractor config\n \"**/karma.conf.js\", // karma config\n \"**/.eslintrc.js\", // eslint config\n \"**/.eslintrc.cjs\", // eslint config\n \"**/.eslintrc.mjs\", // eslint config\n \"**/vite.config.js\", // vite config\n \"**/vite.config.ts\", // vite config\n \"**/vitest.config.js\", // vitest config\n \"**/vitest.config.ts\", // vitest config\n \"**/__tests__/**/*.?(c|m)[jt]s?(x)\", // vitest config test include\n \"**/?(*.){test,spec}.?(c|m)[jt]s?(x)\", // vitest config test include\n ],\n optionalDependencies: false,\n },\n ],\n\n // Forbid require() calls with expressions\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md\n \"import/no-internal-modules\": [\n \"off\",\n {\n allow: [],\n },\n ],\n\n // prevent importing the submodules of other modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Warn if a module could be mistakenly parsed as a script by a consumer\n // leveraging Unambiguous JavaScript Grammar\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md\n // this should not be enabled until this proposal has at least been *presented* to TC39.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\n\n // Forbid Webpack loader syntax in imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // Prevent unassigned imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Prevent importing the default as if it were named\n // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // Reports if a module's default export is unnamed\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // This rule enforces that all exports are declared at the bottom of the file.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md\n \"import/no-nodejs-modules\": \"off\",\n\n // Reports when named exports are not grouped together in a single export declaration\n // or when multiple assignments to CommonJS const config or exports object are present\n // in a single file.\n // https://github.com/benmosher/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md\n \"import/no-relative-parent-imports\": \"off\",\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md\n \"import/no-self-import\": \"error\",\n\n // Forbid a module from importing itself\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // Forbid cyclical dependencies between modules\n // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { caseSensitive: true, commonjs: true }],\n\n // Ensures that there are no useless path segments\n // Note: you must disable the base rule as it can report incorrect errors\n \"import/no-unused-modules\": \"off\",\n\n // dynamic imports require a leading comment with a webpackChunkName\n // https://github.com/benmosher/eslint-plugin-import/blob/ebafcbf59ec9f653b2ac2a0156ca3bcba0a7cf57/docs/rules/no-useless-path-segments.md\n \"import/no-useless-path-segments\": [\"error\", { commonjs: true, noUselessIndex: true }],\n\n // Use this rule to prevent imports to folders in relative parent paths.\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md\n \"import/no-webpack-loader-syntax\": \"error\",\n\n // Reports modules without any exports, or with unused exports\n // https://github.com/benmosher/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md\n \"import/order\": [\n \"error\",\n {\n groups: [[\"builtin\", \"external\", \"internal\"]],\n },\n ],\n\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md\n \"import/prefer-default-export\": \"error\",\n\n // Reports the use of empty named import blocks.\n // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n },\n settings: {\n \"import/core-modules\": [],\n // https://github.com/un-es/eslint-plugin-i/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\".js\", \".cjs\", \".mjs\", \".jsx\"],\n // Ensure consistent use of file extension within the import path\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".js\", \".json\"],\n },\n ...(hasTypescript\n ? {\n typescript: {\n alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`\n project: fromRoot(\"tsconfig.json\"),\n },\n }\n : {}),\n },\n },\n },\n type: \"all\",\n },\n {\n config: {\n extends: [\"plugin:import/typescript\"],\n rules: {\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled because of https://github.com/benmosher/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n\n // Enforce consistent usage of type imports.\n \"import/no-unresolved\": \"off\",\n },\n settings: {\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\", \".cjs\", \".cts\", \".mts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".cts\", \".mts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n typescript: true,\n },\n },\n },\n type: \"typescript\",\n },\n {\n config: {\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n type: \"d.ts\",\n },\n]);\n\nexport default config;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/eslint-config",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.3",
|
|
4
4
|
"description": "ESLint shareable config for the Anolilab JavaScript style guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -126,20 +126,20 @@
|
|
|
126
126
|
"postinstall": "node ./skip.js || node ./dist/postinstall.js"
|
|
127
127
|
},
|
|
128
128
|
"dependencies": {
|
|
129
|
-
"@anolilab/package-json-utils": "3.0.
|
|
130
|
-
"@babel/eslint-parser": "^7.22.
|
|
129
|
+
"@anolilab/package-json-utils": "3.0.4",
|
|
130
|
+
"@babel/eslint-parser": "^7.22.10",
|
|
131
131
|
"@babel/plugin-syntax-import-assertions": "^7.22.5",
|
|
132
132
|
"@html-eslint/eslint-plugin": "^0.19.1",
|
|
133
133
|
"@html-eslint/parser": "^0.19.1",
|
|
134
|
-
"@rushstack/eslint-patch": "^1.3.
|
|
134
|
+
"@rushstack/eslint-patch": "^1.3.3",
|
|
135
135
|
"@rushstack/eslint-plugin-security": "^0.6.0",
|
|
136
|
-
"@typescript-eslint/eslint-plugin": ">=6.
|
|
137
|
-
"@typescript-eslint/parser": "^6.
|
|
136
|
+
"@typescript-eslint/eslint-plugin": ">=6.3.0",
|
|
137
|
+
"@typescript-eslint/parser": "^6.3.0",
|
|
138
138
|
"confusing-browser-globals": "^1.0.11",
|
|
139
|
-
"eslint-define-config": "^1.
|
|
140
|
-
"eslint-import-resolver-node": "^0.3.
|
|
141
|
-
"eslint-import-resolver-typescript": "^3.
|
|
142
|
-
"eslint-plugin-antfu": "^0.40.
|
|
139
|
+
"eslint-define-config": "^1.23.0",
|
|
140
|
+
"eslint-import-resolver-node": "^0.3.9",
|
|
141
|
+
"eslint-import-resolver-typescript": "^3.6.0",
|
|
142
|
+
"eslint-plugin-antfu": "^0.40.2",
|
|
143
143
|
"eslint-plugin-compat": "^4.1.4",
|
|
144
144
|
"eslint-plugin-es-x": "^7.2.0",
|
|
145
145
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"eslint-plugin-i": "^2.28.0",
|
|
148
148
|
"eslint-plugin-jsonc": "^2.9.0",
|
|
149
149
|
"eslint-plugin-markdown": "^3.0.1",
|
|
150
|
-
"eslint-plugin-mdx": "^2.
|
|
150
|
+
"eslint-plugin-mdx": "^2.2.0",
|
|
151
151
|
"eslint-plugin-no-loops": "^0.3.0",
|
|
152
152
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
153
153
|
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"eslint-plugin-regexp": "^1.15.0",
|
|
157
157
|
"eslint-plugin-security": "^1.7.1",
|
|
158
158
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
159
|
-
"eslint-plugin-sonarjs": "^0.
|
|
159
|
+
"eslint-plugin-sonarjs": "^0.20.0",
|
|
160
160
|
"eslint-plugin-toml": "^0.5.0",
|
|
161
161
|
"eslint-plugin-unicorn": "^48.0.1",
|
|
162
162
|
"eslint-plugin-yml": "^1.8.0",
|
|
@@ -170,24 +170,24 @@
|
|
|
170
170
|
"yaml-eslint-parser": "^1.2.2"
|
|
171
171
|
},
|
|
172
172
|
"devDependencies": {
|
|
173
|
-
"@anolilab/semantic-release-preset": "6.0.
|
|
173
|
+
"@anolilab/semantic-release-preset": "6.0.4",
|
|
174
174
|
"@arthurgeron/eslint-plugin-react-usememo": "^1.1.4",
|
|
175
175
|
"@testing-library/dom": "^9.3.1",
|
|
176
176
|
"@total-typescript/ts-reset": "^0.4.2",
|
|
177
177
|
"@types/confusing-browser-globals": "^1.0.0",
|
|
178
|
-
"@types/eslint": "^8.44.
|
|
178
|
+
"@types/eslint": "^8.44.2",
|
|
179
179
|
"@types/semver": "^7.5.0",
|
|
180
180
|
"eslint": "^8.46.0",
|
|
181
181
|
"eslint-find-rules": "^4.1.0",
|
|
182
182
|
"eslint-plugin-babel": "^5.3.1",
|
|
183
|
-
"eslint-plugin-cypress": "^2.
|
|
183
|
+
"eslint-plugin-cypress": "^2.14.0",
|
|
184
184
|
"eslint-plugin-editorconfig": "^4.0.3",
|
|
185
185
|
"eslint-plugin-etc": "^2.0.3",
|
|
186
186
|
"eslint-plugin-jest": "^27.2.3",
|
|
187
187
|
"eslint-plugin-jest-async": "^1.0.3",
|
|
188
|
-
"eslint-plugin-jest-dom": "^5.0.
|
|
188
|
+
"eslint-plugin-jest-dom": "^5.0.2",
|
|
189
189
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
190
|
-
"eslint-plugin-jsdoc": "^46.4.
|
|
190
|
+
"eslint-plugin-jsdoc": "^46.4.6",
|
|
191
191
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
192
192
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
193
193
|
"eslint-plugin-prefer-object-spread": "^1.2.1",
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"eslint-plugin-react-redux": "^4.0.0",
|
|
197
197
|
"eslint-plugin-storybook": "^0.6.13",
|
|
198
198
|
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
199
|
-
"eslint-plugin-testing-library": "^5.11.
|
|
199
|
+
"eslint-plugin-testing-library": "^5.11.1",
|
|
200
200
|
"eslint-plugin-vitest": "^0.2.8",
|
|
201
201
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
202
202
|
"eslint-plugin-you-dont-need-momentjs": "^1.6.0",
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
"rimraf": "^5.0.1",
|
|
207
207
|
"semantic-release": "^21.0.7",
|
|
208
208
|
"tsup": "^7.2.0",
|
|
209
|
-
"type-fest": "^4.
|
|
209
|
+
"type-fest": "^4.2.0",
|
|
210
210
|
"typescript": "^5.1.6",
|
|
211
211
|
"vitest": "^0.34.1"
|
|
212
212
|
},
|
|
@@ -219,13 +219,13 @@
|
|
|
219
219
|
"eslint-plugin-array-func": "^3.1.8",
|
|
220
220
|
"eslint-plugin-ava": "^14.0.0",
|
|
221
221
|
"eslint-plugin-babel": "^5.3.1",
|
|
222
|
-
"eslint-plugin-cypress": "^2.
|
|
222
|
+
"eslint-plugin-cypress": "^2.14.0",
|
|
223
223
|
"eslint-plugin-editorconfig": "^4.0.3",
|
|
224
224
|
"eslint-plugin-jest": "^27.2.3",
|
|
225
225
|
"eslint-plugin-jest-async": "^1.0.3",
|
|
226
|
-
"eslint-plugin-jest-dom": "^5.0.
|
|
226
|
+
"eslint-plugin-jest-dom": "^5.0.2",
|
|
227
227
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
228
|
-
"eslint-plugin-jsdoc": "^46.4.
|
|
228
|
+
"eslint-plugin-jsdoc": "^46.4.6",
|
|
229
229
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
230
230
|
"eslint-plugin-n": "^16.0.1",
|
|
231
231
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
"eslint-plugin-react-redux": "^4.0.0",
|
|
237
237
|
"eslint-plugin-storybook": "^0.6.13",
|
|
238
238
|
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
239
|
-
"eslint-plugin-testing-library": "^5.11.
|
|
239
|
+
"eslint-plugin-testing-library": "^5.11.1",
|
|
240
240
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
241
241
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
242
242
|
"eslint-plugin-you-dont-need-momentjs": "^1.6.0"
|