@anolilab/eslint-config 6.0.0 → 6.0.1
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 +17 -3
- package/dist/chunk-72JA2E3L.js +9 -0
- package/dist/chunk-72JA2E3L.js.map +1 -0
- package/dist/chunk-GPLU2T35.mjs +7 -0
- package/dist/chunk-GPLU2T35.mjs.map +1 -0
- package/dist/config/plugins/import.js +2 -2
- package/dist/config/plugins/import.mjs +1 -1
- package/dist/config/plugins/typescript.js +2 -2
- package/dist/config/plugins/typescript.mjs +1 -1
- package/dist/config/plugins/vitest.js +2 -2
- package/dist/config/plugins/vitest.js.map +1 -1
- package/dist/config/plugins/vitest.mjs +2 -2
- package/dist/config/plugins/vitest.mjs.map +1 -1
- package/package.json +2 -3
- package/dist/chunk-B7GQAMYJ.js +0 -9
- package/dist/chunk-B7GQAMYJ.js.map +0 -1
- package/dist/chunk-XND2BWC4.mjs +0 -7
- package/dist/chunk-XND2BWC4.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## @anolilab/eslint-config [6.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@6.0.0...@anolilab/eslint-config@6.0.1) (2023-06-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added missing eslint-import-resolver-typescript ([0dc836b](https://github.com/anolilab/javascript-style-guide/commit/0dc836b6895af6608e95e59978df4ce5a11d40f5))
|
|
7
|
+
* **esling-config:** fixed rules for vitest ([34536ed](https://github.com/anolilab/javascript-style-guide/commit/34536ed3bb7906f97cc40d2fdf8a44a6334b5c1e))
|
|
8
|
+
|
|
1
9
|
## @anolilab/eslint-config [6.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@5.0.10...@anolilab/eslint-config@6.0.0) (2023-06-16)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -7,9 +15,15 @@
|
|
|
7
15
|
|
|
8
16
|
Signed-off-by: prisis <d.bannert@anolilab.de>
|
|
9
17
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
18
|
+
* Performance Improvements
|
|
19
|
+
* changed eslint-config to a comprehensive eslint code style
|
|
20
|
+
* added new rules for ava, antfu ,zod, vitest
|
|
21
|
+
* updated depracated and disabled rules
|
|
22
|
+
* Added a better readme and adjusted logger output to container more infos
|
|
23
|
+
* Added engine rules, rules will be added based on the engine version or tscofnig target
|
|
24
|
+
* Moved eslint typescript linting to a new file `typescript-type-checking` to improve eslint speed
|
|
25
|
+
* Updated postinstall script to be more adaptive to the environment
|
|
26
|
+
* Added @rushstack/eslint-patch
|
|
13
27
|
|
|
14
28
|
## @anolilab/eslint-config [5.1.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@5.0.10...@anolilab/eslint-config@5.1.0) (2023-06-16)
|
|
15
29
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
4
|
+
|
|
5
|
+
var e={env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],settings:{"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...packageJsonUtils.hasTypescript?{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}:{}},...packageJsonUtils.hasTypescript?{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx"]}}:{},"import/extensions":[".js",".mjs",".jsx"],"import/core-modules":[],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"]},rules:{"import/no-unresolved":["error",{commonjs:!0,caseSensitive:!0}],"import/named":"error","import/default":"off","import/namespace":"off","import/export":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-deprecated":"off","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","**/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-mutable-exports":"error","import/no-commonjs":"off","import/no-amd":"error","import/no-nodejs-modules":"off","import/first":"error","import/imports-first":"off","import/no-duplicates":"error","import/no-namespace":"error","import/extensions":["error","ignorePackages",{js:"never",mjs:"never",jsx:"never"}],"import/order":["error",{groups:[["builtin","external","internal"]]}],"import/newline-after-import":"error","import/prefer-default-export":"error","import/no-restricted-paths":"off","import/max-dependencies":["off",{max:10}],"import/no-absolute-path":"error","import/no-dynamic-require":"error","import/no-internal-modules":["off",{allow:[]}],"import/unambiguous":"off","import/no-webpack-loader-syntax":"error","import/no-unassigned-import":"off","import/no-named-default":"error","import/no-anonymous-default-export":["off",{allowArray:!1,allowArrowFunction:!1,allowAnonymousClass:!1,allowAnonymousFunction:!1,allowLiteral:!1,allowObject:!1}],"import/exports-last":"error","import/group-exports":"off","import/no-default-export":"off","import/no-named-export":"off","import/no-self-import":"error","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/no-relative-parent-imports":"off","import/no-unused-modules":"off","import/consistent-type-specifier-style":["off","prefer-inline"],"import/no-empty-named-blocks":"error"},overrides:[{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"import/export":"off","import/default":"off","import/named":"off"}}]},s=e;
|
|
6
|
+
|
|
7
|
+
exports.a = s;
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-72JA2E3L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/plugins/import.ts"],"names":["fromRoot","hasTypescript","config","import_default"],"mappings":"AAAA,OAAS,YAAAA,EAAU,iBAAAC,MAAqB,+BAGxC,IAAMC,EAAwB,CAC1B,IAAK,CACD,IAAK,EACT,EACA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,EACA,QAAS,CAAC,QAAQ,EAClB,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,MAAO,OAAO,CACvC,EACA,GAAID,EACE,CACI,WAAY,CAER,eAAgB,GAChB,QAASD,EAAS,eAAe,CACrC,CACJ,EACA,CAAC,CACX,EACA,GAAIC,EAAgB,CAAE,iBAAkB,CAAE,4BAA6B,CAAC,MAAO,MAAM,CAAE,CAAE,EAAI,CAAC,EAC9F,oBAAqB,CAAC,MAAO,OAAQ,MAAM,EAC3C,sBAAuB,CAAC,EACxB,gBAAiB,CAAC,yCAAyC,CAC/D,EACA,MAAO,CAKH,uBAAwB,CAAC,QAAS,CAAE,SAAU,GAAM,cAAe,EAAK,CAAC,EAIzE,eAAgB,QAIhB,iBAAkB,MAGlB,mBAAoB,MAMpB,gBAAiB,QAIjB,6BAA8B,QAI9B,oCAAqC,QAIrC,uBAAwB,MAKxB,oCAAqC,CACjC,QACA,CACI,gBAAiB,CACb,UACA,WACA,UACA,gBACA,kBACA,gBACA,kBACA,gCACA,qBACA,mBACA,oBACA,wBACA,yBACA,uBACA,wBACA,iBACA,mBACA,qBACA,wBACA,0BACA,mBACA,kBACA,mBACA,oBACA,oBACA,sBACA,sBACA,oCACA,qCACJ,EACA,qBAAsB,EAC1B,CACJ,EAIA,4BAA6B,QAM7B,qBAAsB,MAItB,gBAAiB,QAIjB,2BAA4B,MAM5B,eAAgB,QAKhB,uBAAwB,MAIxB,uBAAwB,QAIxB,sBAAuB,QAIvB,oBAAqB,CACjB,QACA,iBACA,CACI,GAAI,QACJ,IAAK,QACL,IAAK,OACT,CACJ,EAKA,eAAgB,CACZ,QACA,CACI,OAAQ,CAAC,CAAC,UAAW,WAAY,UAAU,CAAC,CAChD,CACJ,EAIA,8BAA+B,QAI/B,+BAAgC,QAIhC,6BAA8B,MAI9B,0BAA2B,CAAC,MAAO,CAAE,IAAK,EAAG,CAAC,EAI9C,0BAA2B,QAI3B,4BAA6B,QAI7B,6BAA8B,CAC1B,MACA,CACI,MAAO,CAAC,CACZ,CACJ,EAOA,qBAAsB,MAItB,kCAAmC,QAKnC,8BAA+B,MAI/B,0BAA2B,QAI3B,qCAAsC,CAClC,MACA,CACI,WAAY,GACZ,mBAAoB,GACpB,oBAAqB,GACrB,uBAAwB,GACxB,aAAc,GACd,YAAa,EACjB,CACJ,EAIA,sBAAuB,QAMvB,uBAAwB,MAIxB,2BAA4B,MAI5B,yBAA0B,MAI1B,wBAAyB,QAIzB,kBAAmB,CAAC,QAAS,CAAE,SAAU,QAAI,CAAC,EAI9C,kCAAmC,CAAC,QAAS,CAAE,SAAU,GAAM,eAAgB,EAAK,CAAC,EAIrF,kCAAmC,CAC/B,MACA,CACI,gBAAiB,CAAC,EAClB,uBAAwB,kBAC5B,CACJ,EAIA,oCAAqC,MAKrC,2BAA4B,MAK5B,yCAA0C,CAAC,MAAO,eAAe,EAIjE,+BAAgC,OACpC,EAEA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CAEH,gBAAiB,MAGjB,iBAAkB,MAIlB,eAAgB,KACpB,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { fromRoot, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n env: {\n es6: true,\n },\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".js\", \".json\"],\n },\n ...(hasTypescript\n ? {\n typescript: {\n // eslint-disable-next-line max-len\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 ...(hasTypescript ? { \"import/parsers\": { \"@typescript-eslint/parser\": [\".ts\", \".tsx\"] } } : {}),\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\"],\n \"import/core-modules\": [],\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n },\n rules: {\n // Static analysis:\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { commonjs: true, caseSensitive: true }],\n\n // ensure named imports coupled with named exports\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 // ensure default import coupled with default export\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 // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // Helpful warnings:\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md\n \"import/export\": \"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/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\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/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"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 // paths 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 \"**/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 mutable exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Module systems:\n\n // disallow require()\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md\n \"import/no-commonjs\": \"off\",\n\n // disallow AMD require/define\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // No Node.js builtin modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md\n \"import/no-nodejs-modules\": \"off\",\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/first.md\n \"import/first\": \"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 // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // disallow duplicate imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // disallow namespace imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // Ensure consistent use of file extension within the import path\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n mjs: \"never\",\n jsx: \"never\",\n },\n ],\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 // TODO: enforce a stricter convention in module import order?\n \"import/order\": [\n \"error\",\n {\n groups: [[\"builtin\", \"external\", \"internal\"]],\n },\n ],\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/newline-after-import.md\n \"import/newline-after-import\": \"error\",\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/prefer-default-export.md\n \"import/prefer-default-export\": \"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-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Forbid modules to have too many dependencies\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // Forbid import of modules using absolute paths\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // Forbid require() calls with expressions\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // prevent importing the submodules of other modules\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 // 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 // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n\n // Forbid Webpack loader syntax in imports\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 // Prevent unassigned imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // Prevent importing the default as if it were named\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Reports if a module's default export is unnamed\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 allowArray: false,\n allowArrowFunction: false,\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\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/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\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/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // Forbid a module from importing itself\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 cyclical dependencies between modules\n // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // Ensures that there are no useless path segments\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 // dynamic imports require a leading comment with a webpackChunkName\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 // Use this rule to prevent imports to folders in relative parent paths.\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 // 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 // Note: you must disable the base rule as it can report incorrect errors\n \"import/no-unused-modules\": \"off\",\n\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n // TODO, semver-major: enable (just in case)\n \"import/consistent-type-specifier-style\": [\"off\", \"prefer-inline\"],\n\n // Reports the use of empty named import blocks.\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n },\n\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n // Disabled because of https://github.com/benmosher/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n // This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { hasTypescript, fromRoot } from '@anolilab/package-json-utils';
|
|
2
|
+
|
|
3
|
+
var e={env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],settings:{"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...hasTypescript?{typescript:{alwaysTryTypes:!0,project:fromRoot("tsconfig.json")}}:{}},...hasTypescript?{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx"]}}:{},"import/extensions":[".js",".mjs",".jsx"],"import/core-modules":[],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"]},rules:{"import/no-unresolved":["error",{commonjs:!0,caseSensitive:!0}],"import/named":"error","import/default":"off","import/namespace":"off","import/export":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-deprecated":"off","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","**/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-mutable-exports":"error","import/no-commonjs":"off","import/no-amd":"error","import/no-nodejs-modules":"off","import/first":"error","import/imports-first":"off","import/no-duplicates":"error","import/no-namespace":"error","import/extensions":["error","ignorePackages",{js:"never",mjs:"never",jsx:"never"}],"import/order":["error",{groups:[["builtin","external","internal"]]}],"import/newline-after-import":"error","import/prefer-default-export":"error","import/no-restricted-paths":"off","import/max-dependencies":["off",{max:10}],"import/no-absolute-path":"error","import/no-dynamic-require":"error","import/no-internal-modules":["off",{allow:[]}],"import/unambiguous":"off","import/no-webpack-loader-syntax":"error","import/no-unassigned-import":"off","import/no-named-default":"error","import/no-anonymous-default-export":["off",{allowArray:!1,allowArrowFunction:!1,allowAnonymousClass:!1,allowAnonymousFunction:!1,allowLiteral:!1,allowObject:!1}],"import/exports-last":"error","import/group-exports":"off","import/no-default-export":"off","import/no-named-export":"off","import/no-self-import":"error","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/no-relative-parent-imports":"off","import/no-unused-modules":"off","import/consistent-type-specifier-style":["off","prefer-inline"],"import/no-empty-named-blocks":"error"},overrides:[{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"import/export":"off","import/default":"off","import/named":"off"}}]},s=e;
|
|
4
|
+
|
|
5
|
+
export { s as a };
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-GPLU2T35.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/plugins/import.ts"],"names":["fromRoot","hasTypescript","config","import_default"],"mappings":"AAAA,OAAS,YAAAA,EAAU,iBAAAC,MAAqB,+BAGxC,IAAMC,EAAwB,CAC1B,IAAK,CACD,IAAK,EACT,EACA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,EACA,QAAS,CAAC,QAAQ,EAClB,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,MAAO,OAAO,CACvC,EACA,GAAID,EACE,CACI,WAAY,CAER,eAAgB,GAChB,QAASD,EAAS,eAAe,CACrC,CACJ,EACA,CAAC,CACX,EACA,GAAIC,EAAgB,CAAE,iBAAkB,CAAE,4BAA6B,CAAC,MAAO,MAAM,CAAE,CAAE,EAAI,CAAC,EAC9F,oBAAqB,CAAC,MAAO,OAAQ,MAAM,EAC3C,sBAAuB,CAAC,EACxB,gBAAiB,CAAC,yCAAyC,CAC/D,EACA,MAAO,CAKH,uBAAwB,CAAC,QAAS,CAAE,SAAU,GAAM,cAAe,EAAK,CAAC,EAIzE,eAAgB,QAIhB,iBAAkB,MAGlB,mBAAoB,MAMpB,gBAAiB,QAIjB,6BAA8B,QAI9B,oCAAqC,QAIrC,uBAAwB,MAKxB,oCAAqC,CACjC,QACA,CACI,gBAAiB,CACb,UACA,WACA,UACA,gBACA,kBACA,gBACA,kBACA,gCACA,qBACA,mBACA,oBACA,wBACA,yBACA,uBACA,wBACA,iBACA,mBACA,qBACA,wBACA,0BACA,mBACA,kBACA,mBACA,oBACA,oBACA,sBACA,sBACA,oCACA,qCACJ,EACA,qBAAsB,EAC1B,CACJ,EAIA,4BAA6B,QAM7B,qBAAsB,MAItB,gBAAiB,QAIjB,2BAA4B,MAM5B,eAAgB,QAKhB,uBAAwB,MAIxB,uBAAwB,QAIxB,sBAAuB,QAIvB,oBAAqB,CACjB,QACA,iBACA,CACI,GAAI,QACJ,IAAK,QACL,IAAK,OACT,CACJ,EAKA,eAAgB,CACZ,QACA,CACI,OAAQ,CAAC,CAAC,UAAW,WAAY,UAAU,CAAC,CAChD,CACJ,EAIA,8BAA+B,QAI/B,+BAAgC,QAIhC,6BAA8B,MAI9B,0BAA2B,CAAC,MAAO,CAAE,IAAK,EAAG,CAAC,EAI9C,0BAA2B,QAI3B,4BAA6B,QAI7B,6BAA8B,CAC1B,MACA,CACI,MAAO,CAAC,CACZ,CACJ,EAOA,qBAAsB,MAItB,kCAAmC,QAKnC,8BAA+B,MAI/B,0BAA2B,QAI3B,qCAAsC,CAClC,MACA,CACI,WAAY,GACZ,mBAAoB,GACpB,oBAAqB,GACrB,uBAAwB,GACxB,aAAc,GACd,YAAa,EACjB,CACJ,EAIA,sBAAuB,QAMvB,uBAAwB,MAIxB,2BAA4B,MAI5B,yBAA0B,MAI1B,wBAAyB,QAIzB,kBAAmB,CAAC,QAAS,CAAE,SAAU,QAAI,CAAC,EAI9C,kCAAmC,CAAC,QAAS,CAAE,SAAU,GAAM,eAAgB,EAAK,CAAC,EAIrF,kCAAmC,CAC/B,MACA,CACI,gBAAiB,CAAC,EAClB,uBAAwB,kBAC5B,CACJ,EAIA,oCAAqC,MAKrC,2BAA4B,MAK5B,yCAA0C,CAAC,MAAO,eAAe,EAIjE,+BAAgC,OACpC,EAEA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CAEH,gBAAiB,MAGjB,iBAAkB,MAIlB,eAAgB,KACpB,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { fromRoot, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n env: {\n es6: true,\n },\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".js\", \".json\"],\n },\n ...(hasTypescript\n ? {\n typescript: {\n // eslint-disable-next-line max-len\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 ...(hasTypescript ? { \"import/parsers\": { \"@typescript-eslint/parser\": [\".ts\", \".tsx\"] } } : {}),\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\"],\n \"import/core-modules\": [],\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n },\n rules: {\n // Static analysis:\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { commonjs: true, caseSensitive: true }],\n\n // ensure named imports coupled with named exports\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 // ensure default import coupled with default export\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 // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // Helpful warnings:\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md\n \"import/export\": \"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/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\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/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"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 // paths 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 \"**/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 mutable exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Module systems:\n\n // disallow require()\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md\n \"import/no-commonjs\": \"off\",\n\n // disallow AMD require/define\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // No Node.js builtin modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md\n \"import/no-nodejs-modules\": \"off\",\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/first.md\n \"import/first\": \"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 // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // disallow duplicate imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // disallow namespace imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // Ensure consistent use of file extension within the import path\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n mjs: \"never\",\n jsx: \"never\",\n },\n ],\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 // TODO: enforce a stricter convention in module import order?\n \"import/order\": [\n \"error\",\n {\n groups: [[\"builtin\", \"external\", \"internal\"]],\n },\n ],\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/newline-after-import.md\n \"import/newline-after-import\": \"error\",\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/prefer-default-export.md\n \"import/prefer-default-export\": \"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-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Forbid modules to have too many dependencies\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // Forbid import of modules using absolute paths\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // Forbid require() calls with expressions\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // prevent importing the submodules of other modules\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 // 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 // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n\n // Forbid Webpack loader syntax in imports\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 // Prevent unassigned imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // Prevent importing the default as if it were named\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Reports if a module's default export is unnamed\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 allowArray: false,\n allowArrowFunction: false,\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\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/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\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/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // Forbid a module from importing itself\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 cyclical dependencies between modules\n // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // Ensures that there are no useless path segments\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 // dynamic imports require a leading comment with a webpackChunkName\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 // Use this rule to prevent imports to folders in relative parent paths.\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 // 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 // Note: you must disable the base rule as it can report incorrect errors\n \"import/no-unused-modules\": \"off\",\n\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n // TODO, semver-major: enable (just in case)\n \"import/consistent-type-specifier-style\": [\"off\", \"prefer-inline\"],\n\n // Reports the use of empty named import blocks.\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n },\n\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n // Disabled because of https://github.com/benmosher/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n // This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk72JA2E3L_js = require('../../chunk-72JA2E3L.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
module.exports =
|
|
7
|
+
module.exports = chunk72JA2E3L_js.a;
|
|
8
8
|
//# sourceMappingURL=out.js.map
|
|
9
9
|
//# sourceMappingURL=import.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkUJAIXHCQ_js = require('../../chunk-UJAIXHCQ.js');
|
|
4
4
|
var chunkYMWD4DNM_js = require('../../chunk-YMWD4DNM.js');
|
|
5
|
-
var
|
|
5
|
+
var chunk72JA2E3L_js = require('../../chunk-72JA2E3L.js');
|
|
6
6
|
var chunkPCIKFIV2_js = require('../../chunk-PCIKFIV2.js');
|
|
7
7
|
var chunkNO36P4BR_js = require('../../chunk-NO36P4BR.js');
|
|
8
8
|
var chunk6E2RGUNG_js = require('../../chunk-6E2RGUNG.js');
|
|
@@ -10,7 +10,7 @@ var chunkSV64EPVP_js = require('../../chunk-SV64EPVP.js');
|
|
|
10
10
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
11
11
|
var process = require('process');
|
|
12
12
|
|
|
13
|
-
var t=chunk6E2RGUNG_js.a.rules,y=chunkSV64EPVP_js.a.rules,e=chunkNO36P4BR_js.a.rules,d=chunkPCIKFIV2_js.a.rules,g=
|
|
13
|
+
var t=chunk6E2RGUNG_js.a.rules,y=chunkSV64EPVP_js.a.rules,e=chunkNO36P4BR_js.a.rules,d=chunkPCIKFIV2_js.a.rules,g=chunk72JA2E3L_js.a.rules,r=chunkUJAIXHCQ_js.a.rules,{quotes:w,semi:C}=e,{indent:b}=e;packageJsonUtils.hasAnyDep(["prettier"])&&(global.hasAnolilabEsLintConfigTypescriptPrettier||(global.hasAnolilabEsLintConfigTypescriptPrettier=!0,chunkYMWD4DNM_js.b(`
|
|
14
14
|
Found prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824`)),b="off");var n=g["import/extensions"],o=g["import/no-extraneous-dependencies"],s=e["comma-dangle"],x={};packageJsonUtils.pkg&&(x=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);var j={overrides:[{files:["*.ts","*.mts","*.cts","*.tsx"],extends:["plugin:import/typescript"],plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},warnOnUnsupportedTypeScriptVersion:x?.warn_on_unsupported_typescript_version??process.env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true"},settings:{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}},"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts"],"import/external-module-folders":["node_modules","node_modules/@types"]},rules:{strict:"off","brace-style":"off","@typescript-eslint/brace-style":e["brace-style"],camelcase:"off","@typescript-eslint/naming-convention":["error",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE"]},{selector:"function",format:["camelCase","PascalCase"]},{selector:"typeLike",format:["PascalCase"]}],"comma-dangle":"off","@typescript-eslint/comma-dangle":[s[0],{...s[1],enums:s[1].arrays,generics:s[1].arrays,tuples:s[1].arrays}],"comma-spacing":"off","@typescript-eslint/comma-spacing":e["comma-spacing"],"dot-notation":"off","func-call-spacing":"off","@typescript-eslint/func-call-spacing":e["func-call-spacing"],indent:"off","@typescript-eslint/indent":b,"keyword-spacing":"off","@typescript-eslint/keyword-spacing":e["keyword-spacing"],"lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":e["lines-between-class-members"],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":e["no-array-constructor"],"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":d["no-dupe-class-members"],"no-empty-function":"off","@typescript-eslint/no-empty-function":t["no-empty-function"],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":y["no-extra-parens"],"no-extra-semi":"off","@typescript-eslint/no-extra-semi":y["no-extra-semi"],"no-implied-eval":"off","no-new-func":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":t["no-loop-func"],"no-magic-numbers":"off","@typescript-eslint/no-magic-numbers":t["no-magic-numbers"],"no-redeclare":"off","@typescript-eslint/no-redeclare":t["no-redeclare"],"no-shadow":"off","@typescript-eslint/no-shadow":r["no-shadow"],"no-throw-literal":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":t["no-unused-expressions"],"no-unused-vars":"off","@typescript-eslint/no-unused-vars":r["no-unused-vars"],"no-use-before-define":"off","@typescript-eslint/no-use-before-define":r["no-use-before-define"],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":d["no-useless-constructor"],quotes:"off","@typescript-eslint/quotes":w,semi:"off","@typescript-eslint/semi":C,"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":e["space-before-function-paren"],"no-return-await":"off","@typescript-eslint/return-await":t["no-return-await"],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":e["space-infix-ops"],"import/extensions":[n[0],n[1],{...n[2],ts:"never",tsx:"never"}],"import/no-extraneous-dependencies":[o[0],{...o[1],devDependencies:o[1].devDependencies.map(h=>h.replaceAll(/\bjs(x?)\b/g,"ts$1"))}],"constructor-super":"off","getter-return":"off","no-const-assign":"off","no-dupe-args":"off","no-dupe-keys":"off","no-func-assign":"off","no-new-symbol":"off","no-obj-calls":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","valid-typeof":"off","import/named":"off","import/no-unresolved":"off","react/require-default-props":"off","@typescript-eslint/consistent-type-imports":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-types":["error",{types:{String:{message:"Use string instead",fixWith:"string"},Boolean:{message:"Use boolean instead",fixWith:"boolean"},Number:{message:"Use number instead",fixWith:"number"},Object:{message:"Use object instead",fixWith:"object"},Array:{message:"Provide a more specific type"}}}],"@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/method-signature-style":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/no-import-type-side-effects":"error"}},{files:["*.d.ts"],rules:{"import/no-duplicates":"off"}}]},D=j;
|
|
15
15
|
|
|
16
16
|
module.exports = D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as a$5 } from '../../chunk-RWRS63WY.mjs';
|
|
2
2
|
import { b as b$1 } from '../../chunk-G7JIJH44.mjs';
|
|
3
|
-
import { a as a$4 } from '../../chunk-
|
|
3
|
+
import { a as a$4 } from '../../chunk-GPLU2T35.mjs';
|
|
4
4
|
import { a as a$3 } from '../../chunk-WSETOOIE.mjs';
|
|
5
5
|
import { a as a$2 } from '../../chunk-F6JHPR4L.mjs';
|
|
6
6
|
import { a } from '../../chunk-WDMF75TJ.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var e={overrides:[{files:["**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],plugins:["vitest"],extends:["plugin:vitest/recommended","plugin:vitest/all"],rules:{"vitest/max-expects":"off"}}]},t=e;
|
|
4
4
|
|
|
5
|
-
module.exports =
|
|
5
|
+
module.exports = t;
|
|
6
6
|
//# sourceMappingURL=out.js.map
|
|
7
7
|
//# sourceMappingURL=vitest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/vitest.ts"],"names":["config","vitest_default"],"mappings":"AAEA,IAAMA,EAAwB,CAC1B,
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/vitest.ts"],"names":["config","vitest_default"],"mappings":"AAEA,IAAMA,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,oCAAqC,qCAAqC,EAClF,QAAS,CAAC,QAAQ,EAClB,QAAS,CAAC,4BAA6B,mBAAmB,EAC1D,MAAO,CACH,qBAAsB,KAC1B,CACJ,CACJ,CACJ,EAEOC,EAAQD","sourcesContent":["import type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"**/__tests__/**/*.?(c|m)[jt]s?(x)\", \"**/?(*.){test,spec}.?(c|m)[jt]s?(x)\"],\n plugins: [\"vitest\"],\n extends: [\"plugin:vitest/recommended\", \"plugin:vitest/all\"],\n rules: {\n \"vitest/max-expects\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e={overrides:[{files:["**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],plugins:["vitest"],extends:["plugin:vitest/recommended","plugin:vitest/all"],rules:{"vitest/max-expects":"off"}}]},t=e;
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { t as default };
|
|
4
4
|
//# sourceMappingURL=out.js.map
|
|
5
5
|
//# sourceMappingURL=vitest.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/vitest.ts"],"names":["config","vitest_default"],"mappings":"AAEA,IAAMA,EAAwB,CAC1B,
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/vitest.ts"],"names":["config","vitest_default"],"mappings":"AAEA,IAAMA,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,oCAAqC,qCAAqC,EAClF,QAAS,CAAC,QAAQ,EAClB,QAAS,CAAC,4BAA6B,mBAAmB,EAC1D,MAAO,CACH,qBAAsB,KAC1B,CACJ,CACJ,CACJ,EAEOC,EAAQD","sourcesContent":["import type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"**/__tests__/**/*.?(c|m)[jt]s?(x)\", \"**/?(*.){test,spec}.?(c|m)[jt]s?(x)\"],\n plugins: [\"vitest\"],\n extends: [\"plugin:vitest/recommended\", \"plugin:vitest/all\"],\n rules: {\n \"vitest/max-expects\": \"off\",\n },\n },\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": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "ESLint shareable config for the Anolilab JavaScript style guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@typescript-eslint/parser": "^5.59.9",
|
|
73
73
|
"confusing-browser-globals": "^1.0.11",
|
|
74
74
|
"eslint-import-resolver-node": "^0.3.7",
|
|
75
|
+
"eslint-import-resolver-typescript": "^3.5.5",
|
|
75
76
|
"eslint-plugin-antfu": "^0.39.5",
|
|
76
77
|
"eslint-plugin-compat": "^4.1.4",
|
|
77
78
|
"eslint-plugin-es": "^4.1.0",
|
|
@@ -108,7 +109,6 @@
|
|
|
108
109
|
"@types/semver": "^7.5.0",
|
|
109
110
|
"eslint": "^8.42.0",
|
|
110
111
|
"eslint-find-rules": "^4.1.0",
|
|
111
|
-
"eslint-import-resolver-typescript": "^3.5.5",
|
|
112
112
|
"eslint-plugin-babel": "^5.3.1",
|
|
113
113
|
"eslint-plugin-cypress": "^2.13.3",
|
|
114
114
|
"eslint-plugin-jest": "^27.2.1",
|
|
@@ -118,7 +118,6 @@
|
|
|
118
118
|
"eslint-plugin-jsdoc": "^46.2.6",
|
|
119
119
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
120
120
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
121
|
-
"eslint-plugin-node": "^11.1.0",
|
|
122
121
|
"eslint-plugin-prefer-object-spread": "^1.2.1",
|
|
123
122
|
"eslint-plugin-react": "^7.32.2",
|
|
124
123
|
"eslint-plugin-react-hooks": "^4.6.0",
|
package/dist/chunk-B7GQAMYJ.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
4
|
-
|
|
5
|
-
var e={env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],settings:{"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...packageJsonUtils.hasTypescript?{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}:{}},...packageJsonUtils.hasTypescript?{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx"]}}:{},"import/extensions":[".js",".mjs",".jsx"],"import/core-modules":[],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"]},rules:{"import/no-unresolved":["error",{commonjs:!0,caseSensitive:!0}],"import/named":"error","import/default":"off","import/namespace":"off","import/export":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-deprecated":"off","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","**/vite.config.js","**/vite.config.ts","**/vitest.config.js","**/vitest.config.ts"],optionalDependencies:!1}],"import/no-mutable-exports":"error","import/no-commonjs":"off","import/no-amd":"error","import/no-nodejs-modules":"off","import/first":"error","import/imports-first":"off","import/no-duplicates":"error","import/no-namespace":"error","import/extensions":["error","ignorePackages",{js:"never",mjs:"never",jsx:"never"}],"import/order":["error",{groups:[["builtin","external","internal"]]}],"import/newline-after-import":"error","import/prefer-default-export":"error","import/no-restricted-paths":"off","import/max-dependencies":["off",{max:10}],"import/no-absolute-path":"error","import/no-dynamic-require":"error","import/no-internal-modules":["off",{allow:[]}],"import/unambiguous":"off","import/no-webpack-loader-syntax":"error","import/no-unassigned-import":"off","import/no-named-default":"error","import/no-anonymous-default-export":["off",{allowArray:!1,allowArrowFunction:!1,allowAnonymousClass:!1,allowAnonymousFunction:!1,allowLiteral:!1,allowObject:!1}],"import/exports-last":"error","import/group-exports":"off","import/no-default-export":"off","import/no-named-export":"off","import/no-self-import":"error","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/no-relative-parent-imports":"off","import/no-unused-modules":"off","import/consistent-type-specifier-style":["off","prefer-inline"],"import/no-empty-named-blocks":"error"},overrides:[{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"import/export":"off","import/default":"off","import/named":"off"}}]},s=e;
|
|
6
|
-
|
|
7
|
-
exports.a = s;
|
|
8
|
-
//# sourceMappingURL=out.js.map
|
|
9
|
-
//# sourceMappingURL=chunk-B7GQAMYJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/plugins/import.ts"],"names":["fromRoot","hasTypescript","config","import_default"],"mappings":"AAAA,OAAS,YAAAA,EAAU,iBAAAC,MAAqB,+BAGxC,IAAMC,EAAwB,CAC1B,IAAK,CACD,IAAK,EACT,EACA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,EACA,QAAS,CAAC,QAAQ,EAClB,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,MAAO,OAAO,CACvC,EACA,GAAID,EACE,CACI,WAAY,CAER,eAAgB,GAChB,QAASD,EAAS,eAAe,CACrC,CACJ,EACA,CAAC,CACX,EACA,GAAIC,EAAgB,CAAE,iBAAkB,CAAE,4BAA6B,CAAC,MAAO,MAAM,CAAE,CAAE,EAAI,CAAC,EAC9F,oBAAqB,CAAC,MAAO,OAAQ,MAAM,EAC3C,sBAAuB,CAAC,EACxB,gBAAiB,CAAC,yCAAyC,CAC/D,EACA,MAAO,CAKH,uBAAwB,CAAC,QAAS,CAAE,SAAU,GAAM,cAAe,EAAK,CAAC,EAIzE,eAAgB,QAIhB,iBAAkB,MAGlB,mBAAoB,MAMpB,gBAAiB,QAIjB,6BAA8B,QAI9B,oCAAqC,QAIrC,uBAAwB,MAKxB,oCAAqC,CACjC,QACA,CACI,gBAAiB,CACb,UACA,WACA,UACA,gBACA,kBACA,gBACA,kBACA,gCACA,qBACA,mBACA,oBACA,wBACA,yBACA,uBACA,wBACA,iBACA,mBACA,qBACA,wBACA,0BACA,mBACA,kBACA,mBACA,oBACA,oBACA,sBACA,qBACJ,EACA,qBAAsB,EAC1B,CACJ,EAIA,4BAA6B,QAM7B,qBAAsB,MAItB,gBAAiB,QAIjB,2BAA4B,MAM5B,eAAgB,QAKhB,uBAAwB,MAIxB,uBAAwB,QAIxB,sBAAuB,QAIvB,oBAAqB,CACjB,QACA,iBACA,CACI,GAAI,QACJ,IAAK,QACL,IAAK,OACT,CACJ,EAKA,eAAgB,CACZ,QACA,CACI,OAAQ,CAAC,CAAC,UAAW,WAAY,UAAU,CAAC,CAChD,CACJ,EAIA,8BAA+B,QAI/B,+BAAgC,QAIhC,6BAA8B,MAI9B,0BAA2B,CAAC,MAAO,CAAE,IAAK,EAAG,CAAC,EAI9C,0BAA2B,QAI3B,4BAA6B,QAI7B,6BAA8B,CAC1B,MACA,CACI,MAAO,CAAC,CACZ,CACJ,EAOA,qBAAsB,MAItB,kCAAmC,QAKnC,8BAA+B,MAI/B,0BAA2B,QAI3B,qCAAsC,CAClC,MACA,CACI,WAAY,GACZ,mBAAoB,GACpB,oBAAqB,GACrB,uBAAwB,GACxB,aAAc,GACd,YAAa,EACjB,CACJ,EAIA,sBAAuB,QAMvB,uBAAwB,MAIxB,2BAA4B,MAI5B,yBAA0B,MAI1B,wBAAyB,QAIzB,kBAAmB,CAAC,QAAS,CAAE,SAAU,QAAI,CAAC,EAI9C,kCAAmC,CAAC,QAAS,CAAE,SAAU,GAAM,eAAgB,EAAK,CAAC,EAIrF,kCAAmC,CAC/B,MACA,CACI,gBAAiB,CAAC,EAClB,uBAAwB,kBAC5B,CACJ,EAIA,oCAAqC,MAKrC,2BAA4B,MAK5B,yCAA0C,CAAC,MAAO,eAAe,EAIjE,+BAAgC,OACpC,EAEA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CAEH,gBAAiB,MAGjB,iBAAkB,MAIlB,eAAgB,KACpB,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { fromRoot, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n env: {\n es6: true,\n },\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".js\", \".json\"],\n },\n ...(hasTypescript\n ? {\n typescript: {\n // eslint-disable-next-line max-len\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 ...(hasTypescript ? { \"import/parsers\": { \"@typescript-eslint/parser\": [\".ts\", \".tsx\"] } } : {}),\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\"],\n \"import/core-modules\": [],\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n },\n rules: {\n // Static analysis:\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { commonjs: true, caseSensitive: true }],\n\n // ensure named imports coupled with named exports\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 // ensure default import coupled with default export\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 // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // Helpful warnings:\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md\n \"import/export\": \"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/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\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/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"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 // paths 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 \"**/vite.config.js\", // vite config\n \"**/vite.config.ts\", // vite config\n \"**/vitest.config.js\", // vitest config\n \"**/vitest.config.ts\", // vitest config\n ],\n optionalDependencies: false,\n },\n ],\n\n // Forbid mutable exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Module systems:\n\n // disallow require()\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md\n \"import/no-commonjs\": \"off\",\n\n // disallow AMD require/define\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // No Node.js builtin modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md\n \"import/no-nodejs-modules\": \"off\",\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/first.md\n \"import/first\": \"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 // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // disallow duplicate imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // disallow namespace imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // Ensure consistent use of file extension within the import path\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n mjs: \"never\",\n jsx: \"never\",\n },\n ],\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 // TODO: enforce a stricter convention in module import order?\n \"import/order\": [\n \"error\",\n {\n groups: [[\"builtin\", \"external\", \"internal\"]],\n },\n ],\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/newline-after-import.md\n \"import/newline-after-import\": \"error\",\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/prefer-default-export.md\n \"import/prefer-default-export\": \"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-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Forbid modules to have too many dependencies\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // Forbid import of modules using absolute paths\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // Forbid require() calls with expressions\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // prevent importing the submodules of other modules\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 // 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 // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n\n // Forbid Webpack loader syntax in imports\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 // Prevent unassigned imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // Prevent importing the default as if it were named\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Reports if a module's default export is unnamed\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 allowArray: false,\n allowArrowFunction: false,\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\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/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\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/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // Forbid a module from importing itself\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 cyclical dependencies between modules\n // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // Ensures that there are no useless path segments\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 // dynamic imports require a leading comment with a webpackChunkName\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 // Use this rule to prevent imports to folders in relative parent paths.\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 // 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 // Note: you must disable the base rule as it can report incorrect errors\n \"import/no-unused-modules\": \"off\",\n\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n // TODO, semver-major: enable (just in case)\n \"import/consistent-type-specifier-style\": [\"off\", \"prefer-inline\"],\n\n // Reports the use of empty named import blocks.\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n },\n\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n // Disabled because of https://github.com/benmosher/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n // This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
package/dist/chunk-XND2BWC4.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { hasTypescript, fromRoot } from '@anolilab/package-json-utils';
|
|
2
|
-
|
|
3
|
-
var e={env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],settings:{"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...hasTypescript?{typescript:{alwaysTryTypes:!0,project:fromRoot("tsconfig.json")}}:{}},...hasTypescript?{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx"]}}:{},"import/extensions":[".js",".mjs",".jsx"],"import/core-modules":[],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"]},rules:{"import/no-unresolved":["error",{commonjs:!0,caseSensitive:!0}],"import/named":"error","import/default":"off","import/namespace":"off","import/export":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-deprecated":"off","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","**/vite.config.js","**/vite.config.ts","**/vitest.config.js","**/vitest.config.ts"],optionalDependencies:!1}],"import/no-mutable-exports":"error","import/no-commonjs":"off","import/no-amd":"error","import/no-nodejs-modules":"off","import/first":"error","import/imports-first":"off","import/no-duplicates":"error","import/no-namespace":"error","import/extensions":["error","ignorePackages",{js:"never",mjs:"never",jsx:"never"}],"import/order":["error",{groups:[["builtin","external","internal"]]}],"import/newline-after-import":"error","import/prefer-default-export":"error","import/no-restricted-paths":"off","import/max-dependencies":["off",{max:10}],"import/no-absolute-path":"error","import/no-dynamic-require":"error","import/no-internal-modules":["off",{allow:[]}],"import/unambiguous":"off","import/no-webpack-loader-syntax":"error","import/no-unassigned-import":"off","import/no-named-default":"error","import/no-anonymous-default-export":["off",{allowArray:!1,allowArrowFunction:!1,allowAnonymousClass:!1,allowAnonymousFunction:!1,allowLiteral:!1,allowObject:!1}],"import/exports-last":"error","import/group-exports":"off","import/no-default-export":"off","import/no-named-export":"off","import/no-self-import":"error","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/no-relative-parent-imports":"off","import/no-unused-modules":"off","import/consistent-type-specifier-style":["off","prefer-inline"],"import/no-empty-named-blocks":"error"},overrides:[{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"import/export":"off","import/default":"off","import/named":"off"}}]},s=e;
|
|
4
|
-
|
|
5
|
-
export { s as a };
|
|
6
|
-
//# sourceMappingURL=out.js.map
|
|
7
|
-
//# sourceMappingURL=chunk-XND2BWC4.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/config/plugins/import.ts"],"names":["fromRoot","hasTypescript","config","import_default"],"mappings":"AAAA,OAAS,YAAAA,EAAU,iBAAAC,MAAqB,+BAGxC,IAAMC,EAAwB,CAC1B,IAAK,CACD,IAAK,EACT,EACA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,EACA,QAAS,CAAC,QAAQ,EAClB,SAAU,CACN,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,MAAO,OAAO,CACvC,EACA,GAAID,EACE,CACI,WAAY,CAER,eAAgB,GAChB,QAASD,EAAS,eAAe,CACrC,CACJ,EACA,CAAC,CACX,EACA,GAAIC,EAAgB,CAAE,iBAAkB,CAAE,4BAA6B,CAAC,MAAO,MAAM,CAAE,CAAE,EAAI,CAAC,EAC9F,oBAAqB,CAAC,MAAO,OAAQ,MAAM,EAC3C,sBAAuB,CAAC,EACxB,gBAAiB,CAAC,yCAAyC,CAC/D,EACA,MAAO,CAKH,uBAAwB,CAAC,QAAS,CAAE,SAAU,GAAM,cAAe,EAAK,CAAC,EAIzE,eAAgB,QAIhB,iBAAkB,MAGlB,mBAAoB,MAMpB,gBAAiB,QAIjB,6BAA8B,QAI9B,oCAAqC,QAIrC,uBAAwB,MAKxB,oCAAqC,CACjC,QACA,CACI,gBAAiB,CACb,UACA,WACA,UACA,gBACA,kBACA,gBACA,kBACA,gCACA,qBACA,mBACA,oBACA,wBACA,yBACA,uBACA,wBACA,iBACA,mBACA,qBACA,wBACA,0BACA,mBACA,kBACA,mBACA,oBACA,oBACA,sBACA,qBACJ,EACA,qBAAsB,EAC1B,CACJ,EAIA,4BAA6B,QAM7B,qBAAsB,MAItB,gBAAiB,QAIjB,2BAA4B,MAM5B,eAAgB,QAKhB,uBAAwB,MAIxB,uBAAwB,QAIxB,sBAAuB,QAIvB,oBAAqB,CACjB,QACA,iBACA,CACI,GAAI,QACJ,IAAK,QACL,IAAK,OACT,CACJ,EAKA,eAAgB,CACZ,QACA,CACI,OAAQ,CAAC,CAAC,UAAW,WAAY,UAAU,CAAC,CAChD,CACJ,EAIA,8BAA+B,QAI/B,+BAAgC,QAIhC,6BAA8B,MAI9B,0BAA2B,CAAC,MAAO,CAAE,IAAK,EAAG,CAAC,EAI9C,0BAA2B,QAI3B,4BAA6B,QAI7B,6BAA8B,CAC1B,MACA,CACI,MAAO,CAAC,CACZ,CACJ,EAOA,qBAAsB,MAItB,kCAAmC,QAKnC,8BAA+B,MAI/B,0BAA2B,QAI3B,qCAAsC,CAClC,MACA,CACI,WAAY,GACZ,mBAAoB,GACpB,oBAAqB,GACrB,uBAAwB,GACxB,aAAc,GACd,YAAa,EACjB,CACJ,EAIA,sBAAuB,QAMvB,uBAAwB,MAIxB,2BAA4B,MAI5B,yBAA0B,MAI1B,wBAAyB,QAIzB,kBAAmB,CAAC,QAAS,CAAE,SAAU,QAAI,CAAC,EAI9C,kCAAmC,CAAC,QAAS,CAAE,SAAU,GAAM,eAAgB,EAAK,CAAC,EAIrF,kCAAmC,CAC/B,MACA,CACI,gBAAiB,CAAC,EAClB,uBAAwB,kBAC5B,CACJ,EAIA,oCAAqC,MAKrC,2BAA4B,MAK5B,yCAA0C,CAAC,MAAO,eAAe,EAIjE,+BAAgC,OACpC,EAEA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CAEH,gBAAiB,MAGjB,iBAAkB,MAIlB,eAAgB,KACpB,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { fromRoot, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n env: {\n es6: true,\n },\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n settings: {\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".js\", \".json\"],\n },\n ...(hasTypescript\n ? {\n typescript: {\n // eslint-disable-next-line max-len\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 ...(hasTypescript ? { \"import/parsers\": { \"@typescript-eslint/parser\": [\".ts\", \".tsx\"] } } : {}),\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\"],\n \"import/core-modules\": [],\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n },\n rules: {\n // Static analysis:\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { commonjs: true, caseSensitive: true }],\n\n // ensure named imports coupled with named exports\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 // ensure default import coupled with default export\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 // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // Helpful warnings:\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/export.md\n \"import/export\": \"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/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\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/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"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 // paths 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 \"**/vite.config.js\", // vite config\n \"**/vite.config.ts\", // vite config\n \"**/vitest.config.js\", // vitest config\n \"**/vitest.config.ts\", // vitest config\n ],\n optionalDependencies: false,\n },\n ],\n\n // Forbid mutable exports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Module systems:\n\n // disallow require()\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md\n \"import/no-commonjs\": \"off\",\n\n // disallow AMD require/define\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // No Node.js builtin modules\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-nodejs-modules.md\n \"import/no-nodejs-modules\": \"off\",\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/first.md\n \"import/first\": \"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 // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // disallow duplicate imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // disallow namespace imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // Ensure consistent use of file extension within the import path\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n mjs: \"never\",\n jsx: \"never\",\n },\n ],\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 // TODO: enforce a stricter convention in module import order?\n \"import/order\": [\n \"error\",\n {\n groups: [[\"builtin\", \"external\", \"internal\"]],\n },\n ],\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/newline-after-import.md\n \"import/newline-after-import\": \"error\",\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/prefer-default-export.md\n \"import/prefer-default-export\": \"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-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Forbid modules to have too many dependencies\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // Forbid import of modules using absolute paths\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // Forbid require() calls with expressions\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // prevent importing the submodules of other modules\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 // 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 // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n\n // Forbid Webpack loader syntax in imports\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 // Prevent unassigned imports\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // Prevent importing the default as if it were named\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Reports if a module's default export is unnamed\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 allowArray: false,\n allowArrowFunction: false,\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\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/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\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/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/benmosher/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // Forbid a module from importing itself\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 cyclical dependencies between modules\n // https://github.com/benmosher/eslint-plugin-import/blob/d81f48a2506182738409805f5272eff4d77c9348/docs/rules/no-cycle.md\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // Ensures that there are no useless path segments\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 // dynamic imports require a leading comment with a webpackChunkName\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 // Use this rule to prevent imports to folders in relative parent paths.\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 // 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 // Note: you must disable the base rule as it can report incorrect errors\n \"import/no-unused-modules\": \"off\",\n\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n // TODO, semver-major: enable (just in case)\n \"import/consistent-type-specifier-style\": [\"off\", \"prefer-inline\"],\n\n // Reports the use of empty named import blocks.\n // https://github.com/import-js/eslint-plugin-import/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n },\n\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n // Disabled because of https://github.com/benmosher/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n // This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|