@useinsider/eslint-config 4.0.0-beta.3 → 4.0.0-beta.4
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/dist/cli.cjs +27 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/{javascript-dom-CvtQ6_9W.cjs → javascript-dom-bySaQErv.cjs} +4 -4
- package/dist/{javascript-dom-CvtQ6_9W.cjs.map → javascript-dom-bySaQErv.cjs.map} +1 -1
- package/dist/{javascript-node-BNsy3loY.cjs → javascript-node-DZxexKer.cjs} +4 -4
- package/dist/{javascript-node-BNsy3loY.cjs.map → javascript-node-DZxexKer.cjs.map} +1 -1
- package/dist/{javascript-DH8-N38w.cjs → javascript-ycJ4W-e9.cjs} +5 -5
- package/dist/{javascript-DH8-N38w.cjs.map → javascript-ycJ4W-e9.cjs.map} +1 -1
- package/dist/{jest-4Es9Ggaa.cjs → jest-B2fpQmUB.cjs} +3 -3
- package/dist/{jest-4Es9Ggaa.cjs.map → jest-B2fpQmUB.cjs.map} +1 -1
- package/dist/main.cjs +30 -32
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +4 -6
- package/dist/main.js.map +1 -1
- package/dist/{oxlintOwnership-7hpdB3d1.cjs → removedOptions-BYMW8w__.cjs} +29 -1
- package/dist/removedOptions-BYMW8w__.cjs.map +1 -0
- package/dist/{oxlintOwnership-Cx0hgA_J.js → removedOptions-Cb8SG8SI.js} +18 -2
- package/dist/removedOptions-Cb8SG8SI.js.map +1 -0
- package/dist/{stylistic-CoP3MT1Y.cjs → stylistic-B2hCwBRu.cjs} +4 -4
- package/dist/{stylistic-CoP3MT1Y.cjs.map → stylistic-B2hCwBRu.cjs.map} +1 -1
- package/dist/{typescript-D3VeLnpn.cjs → typescript-DdgbCNKI.cjs} +7 -7
- package/dist/{typescript-D3VeLnpn.cjs.map → typescript-DdgbCNKI.cjs.map} +1 -1
- package/dist/{typescript-dom-iB_xBTAD.cjs → typescript-dom-C0NNSGLd.cjs} +4 -4
- package/dist/{typescript-dom-iB_xBTAD.cjs.map → typescript-dom-C0NNSGLd.cjs.map} +1 -1
- package/dist/{typescript-node-Cq6qhj53.cjs → typescript-node-CjG8N83q.cjs} +4 -4
- package/dist/{typescript-node-Cq6qhj53.cjs.map → typescript-node-CjG8N83q.cjs.map} +1 -1
- package/dist/utils/removedOptions.d.ts +10 -0
- package/dist/{vitest-BlGQswK2.cjs → vitest-B3kOWOzo.cjs} +3 -3
- package/dist/{vitest-BlGQswK2.cjs.map → vitest-B3kOWOzo.cjs.map} +1 -1
- package/dist/{vue2-Da1i_oVn.cjs → vue2-DfL5FqeZ.cjs} +8 -8
- package/dist/{vue2-Da1i_oVn.cjs.map → vue2-DfL5FqeZ.cjs.map} +1 -1
- package/dist/{vue2-options-api-BSdrUm8H.cjs → vue2-options-api-sSrBV5Si.cjs} +8 -8
- package/dist/{vue2-options-api-BSdrUm8H.cjs.map → vue2-options-api-sSrBV5Si.cjs.map} +1 -1
- package/dist/{vue2-typescript-options-api-LM7U5dWq.cjs → vue2-typescript-options-api-CbRC2wf-.cjs} +10 -10
- package/dist/{vue2-typescript-options-api-LM7U5dWq.cjs.map → vue2-typescript-options-api-CbRC2wf-.cjs.map} +1 -1
- package/dist/{vue2-typescript-dXLRSGNP.cjs → vue2-typescript-rJIMzNUI.cjs} +10 -10
- package/dist/{vue2-typescript-dXLRSGNP.cjs.map → vue2-typescript-rJIMzNUI.cjs.map} +1 -1
- package/dist/{vue3-621EM2Ii.cjs → vue3-DmrGRHbo.cjs} +8 -8
- package/dist/{vue3-621EM2Ii.cjs.map → vue3-DmrGRHbo.cjs.map} +1 -1
- package/dist/{vue3-options-api-CC9_fAiq.cjs → vue3-options-api-DPEk8rBk.cjs} +8 -8
- package/dist/{vue3-options-api-CC9_fAiq.cjs.map → vue3-options-api-DPEk8rBk.cjs.map} +1 -1
- package/dist/{vue3-typescript-DONe-IKz.cjs → vue3-typescript-Dz5BM0LJ.cjs} +10 -10
- package/dist/{vue3-typescript-DONe-IKz.cjs.map → vue3-typescript-Dz5BM0LJ.cjs.map} +1 -1
- package/dist/{vue3-typescript-options-api-D4pqpDFs.cjs → vue3-typescript-options-api-DiYz_vVd.cjs} +10 -10
- package/dist/{vue3-typescript-options-api-D4pqpDFs.cjs.map → vue3-typescript-options-api-DiYz_vVd.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/oxlintOwnership-7hpdB3d1.cjs.map +0 -1
- package/dist/oxlintOwnership-Cx0hgA_J.js.map +0 -1
package/dist/{vue2-typescript-options-api-LM7U5dWq.cjs → vue2-typescript-options-api-CbRC2wf-.cjs}
RENAMED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_removedOptions = require("./removedOptions-BYMW8w__.cjs");
|
|
2
2
|
const require_merge = require("./merge-DJQU2y2U.cjs");
|
|
3
3
|
const require_mergeAllConfig = require("./mergeAllConfig-DjMWjBNg.cjs");
|
|
4
|
-
const require_stylistic = require("./stylistic-
|
|
4
|
+
const require_stylistic = require("./stylistic-B2hCwBRu.cjs");
|
|
5
5
|
const require_removePluginsFromConfigs = require("./removePluginsFromConfigs-D0oSUj2C.cjs");
|
|
6
6
|
const require_vue_options_api = require("./vue-options-api-9KoVvBkF.cjs");
|
|
7
7
|
const require_vue2 = require("./vue2-CwpD2fD-.cjs");
|
|
8
8
|
const require_vue2_typescript = require("./vue2-typescript-Cr8IshuA.cjs");
|
|
9
9
|
let globals = require("globals");
|
|
10
|
-
globals =
|
|
10
|
+
globals = require_removedOptions.__toESM(globals, 1);
|
|
11
11
|
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
12
|
-
_stylistic_eslint_plugin =
|
|
12
|
+
_stylistic_eslint_plugin = require_removedOptions.__toESM(_stylistic_eslint_plugin, 1);
|
|
13
13
|
let eslint_config_airbnb_extended = require("eslint-config-airbnb-extended");
|
|
14
14
|
let eslint_plugin_import_x = require("eslint-plugin-import-x");
|
|
15
15
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
16
|
-
eslint_plugin_jsdoc =
|
|
16
|
+
eslint_plugin_jsdoc = require_removedOptions.__toESM(eslint_plugin_jsdoc, 1);
|
|
17
17
|
let _eslint_js = require("@eslint/js");
|
|
18
|
-
_eslint_js =
|
|
18
|
+
_eslint_js = require_removedOptions.__toESM(_eslint_js, 1);
|
|
19
19
|
let typescript_eslint = require("typescript-eslint");
|
|
20
|
-
typescript_eslint =
|
|
20
|
+
typescript_eslint = require_removedOptions.__toESM(typescript_eslint, 1);
|
|
21
21
|
let eslint_plugin_vue = require("eslint-plugin-vue");
|
|
22
|
-
eslint_plugin_vue =
|
|
22
|
+
eslint_plugin_vue = require_removedOptions.__toESM(eslint_plugin_vue, 1);
|
|
23
23
|
let eslint_plugin_vue_scoped_css = require("eslint-plugin-vue-scoped-css");
|
|
24
|
-
eslint_plugin_vue_scoped_css =
|
|
24
|
+
eslint_plugin_vue_scoped_css = require_removedOptions.__toESM(eslint_plugin_vue_scoped_css, 1);
|
|
25
25
|
//#region src/configs/vue2-typescript-options-api/index.ts
|
|
26
26
|
var vue2_typescript_options_api_default = require_mergeAllConfig.mergeAll(typescript_eslint.default.config(_eslint_js.default.configs.recommended, eslint_plugin_import_x.importX.flatConfigs.recommended, ...eslint_config_airbnb_extended.configs.base.all, ...typescript_eslint.default.configs.recommended, ...require_removePluginsFromConfigs.removePluginsFromConfigs(typescript_eslint.default.configs.recommendedTypeChecked), ...eslint_plugin_vue.default.configs["flat/vue2-recommended"].map((config) => {
|
|
27
27
|
delete config.files;
|
|
@@ -47,4 +47,4 @@ var vue2_typescript_options_api_default = require_mergeAllConfig.mergeAll(typesc
|
|
|
47
47
|
//#endregion
|
|
48
48
|
exports.default = vue2_typescript_options_api_default;
|
|
49
49
|
|
|
50
|
-
//# sourceMappingURL=vue2-typescript-options-api-
|
|
50
|
+
//# sourceMappingURL=vue2-typescript-options-api-CbRC2wf-.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue2-typescript-options-api-
|
|
1
|
+
{"version":3,"file":"vue2-typescript-options-api-CbRC2wf-.cjs","names":[],"sources":["../src/configs/vue2-typescript-options-api/index.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport js from '@eslint/js';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { configs as airbnbConfigs } from 'eslint-config-airbnb-extended';\nimport { importX } from 'eslint-plugin-import-x';\nimport jsdocPlugin from 'eslint-plugin-jsdoc';\nimport eslintPluginVue from 'eslint-plugin-vue';\nimport eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';\nimport globals from 'globals';\nimport ts from 'typescript-eslint';\nimport { postConfig, preConfig } from '~/base';\nimport core from '~/rules/core';\nimport cspell from '~/rules/cspell';\nimport importRules from '~/rules/importRules';\nimport stylisticRules from '~/rules/stylistic';\nimport typescript from '~/rules/typescript';\nimport { vueOptionsApi } from '~/rules/vue-options-api';\nimport { vue2Options } from '~/rules/vue2';\nimport { vue2Typescript } from '~/rules/vue2-typescript';\nimport { merge } from '~/utils/merge';\nimport { mergeAll } from '~/utils/mergeAllConfig';\nimport { removePluginsFromConfigs } from '~/utils/removePluginsFromConfigs';\n\nexport default mergeAll((\n // eslint-disable-next-line sonarjs/deprecation -- defineConfig from eslint/config has a ConfigWithExtends type incompatible with the vue/typescript-eslint plugin configs in this version\n ts.config(\n js.configs.recommended,\n importX.flatConfigs.recommended,\n ...airbnbConfigs.base.all,\n ...ts.configs.recommended,\n ...removePluginsFromConfigs(ts.configs.recommendedTypeChecked),\n ...eslintPluginVue.configs['flat/vue2-recommended'].map(config => {\n delete config.files;\n\n return config;\n }),\n ...eslintPluginVueScopedCSS.configs['flat/vue2-recommended'],\n jsdocPlugin.configs['flat/recommended-typescript-error'],\n merge<Linter.Config[]>(\n preConfig(),\n core,\n importRules,\n cspell,\n { plugins: { '@stylistic': stylistic } } satisfies Linter.Config,\n stylisticRules,\n vue2Options,\n typescript,\n vue2Typescript,\n vueOptionsApi,\n postConfig(),\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n parser: ts.parser,\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n extraFileExtensions: ['.vue'],\n },\n },\n settings: {\n jsdoc: {\n mode: 'typescript',\n tagNamePreference: {\n callback: 'watch',\n desc: 'use',\n },\n },\n },\n }\n )\n )\n) as Linter.Config[]);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAA,sCAAe,uBAAA,SAEX,kBAAA,QAAG,OACC,WAAA,QAAG,QAAQ,aACX,uBAAA,QAAQ,YAAY,aACpB,GAAG,8BAAA,QAAc,KAAK,KACtB,GAAG,kBAAA,QAAG,QAAQ,aACd,GAAG,iCAAA,yBAAyB,kBAAA,QAAG,QAAQ,sBAAsB,GAC7D,GAAG,kBAAA,QAAgB,QAAQ,wBAAwB,CAAC,KAAI,WAAS;CAC7D,OAAO,OAAO;CAEd,OAAO;AACX,CAAC,GACD,GAAG,6BAAA,QAAyB,QAAQ,0BACpC,oBAAA,QAAY,QAAQ,sCACpB,cAAA,MACI,kBAAA,UAAS,GACT,kBAAA,cACA,kBAAA,qBACA,kBAAA,gBACA,EAAE,SAAS,EAAE,cAAc,yBAAA,QAAS,EAAE,GACtC,kBAAA,mBACA,aAAA,aACA,iCAAA,oBACA,wBAAA,gBACA,wBAAA,eACA,kBAAA,WAAU,GACV;CACI,iBAAiB;EACb,SAAS,EACL,GAAG,QAAA,QAAQ,QACd;EACD,eAAe;GACX,QAAQ,kBAAA,QAAG;GACX,YAAY;GACZ,cAAc,EACV,KAAK,KACR;GACD,qBAAqB,CAAC,MAAM;EAC/B;CACJ;CACD,UAAU,EACN,OAAO;EACH,MAAM;EACN,mBAAmB;GACf,UAAU;GACV,MAAM;EACT;CACJ,EACJ;AACJ,CAAA,CACJ,CAEW"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_removedOptions = require("./removedOptions-BYMW8w__.cjs");
|
|
2
2
|
const require_merge = require("./merge-DJQU2y2U.cjs");
|
|
3
3
|
const require_mergeAllConfig = require("./mergeAllConfig-DjMWjBNg.cjs");
|
|
4
|
-
const require_stylistic = require("./stylistic-
|
|
4
|
+
const require_stylistic = require("./stylistic-B2hCwBRu.cjs");
|
|
5
5
|
const require_removePluginsFromConfigs = require("./removePluginsFromConfigs-D0oSUj2C.cjs");
|
|
6
6
|
const require_vue2 = require("./vue2-CwpD2fD-.cjs");
|
|
7
7
|
const require_vue2_typescript = require("./vue2-typescript-Cr8IshuA.cjs");
|
|
8
8
|
let globals = require("globals");
|
|
9
|
-
globals =
|
|
9
|
+
globals = require_removedOptions.__toESM(globals, 1);
|
|
10
10
|
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
11
|
-
_stylistic_eslint_plugin =
|
|
11
|
+
_stylistic_eslint_plugin = require_removedOptions.__toESM(_stylistic_eslint_plugin, 1);
|
|
12
12
|
let eslint_config_airbnb_extended = require("eslint-config-airbnb-extended");
|
|
13
13
|
let eslint_plugin_import_x = require("eslint-plugin-import-x");
|
|
14
14
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
15
|
-
eslint_plugin_jsdoc =
|
|
15
|
+
eslint_plugin_jsdoc = require_removedOptions.__toESM(eslint_plugin_jsdoc, 1);
|
|
16
16
|
let _eslint_js = require("@eslint/js");
|
|
17
|
-
_eslint_js =
|
|
17
|
+
_eslint_js = require_removedOptions.__toESM(_eslint_js, 1);
|
|
18
18
|
let typescript_eslint = require("typescript-eslint");
|
|
19
|
-
typescript_eslint =
|
|
19
|
+
typescript_eslint = require_removedOptions.__toESM(typescript_eslint, 1);
|
|
20
20
|
let eslint_plugin_vue = require("eslint-plugin-vue");
|
|
21
|
-
eslint_plugin_vue =
|
|
21
|
+
eslint_plugin_vue = require_removedOptions.__toESM(eslint_plugin_vue, 1);
|
|
22
22
|
let eslint_plugin_vue_scoped_css = require("eslint-plugin-vue-scoped-css");
|
|
23
|
-
eslint_plugin_vue_scoped_css =
|
|
23
|
+
eslint_plugin_vue_scoped_css = require_removedOptions.__toESM(eslint_plugin_vue_scoped_css, 1);
|
|
24
24
|
//#region src/configs/vue2-typescript/index.ts
|
|
25
25
|
var vue2_typescript_default = require_mergeAllConfig.mergeAll(typescript_eslint.default.config(_eslint_js.default.configs.recommended, eslint_plugin_import_x.importX.flatConfigs.recommended, ...eslint_config_airbnb_extended.configs.base.all, ...typescript_eslint.default.configs.recommended, ...require_removePluginsFromConfigs.removePluginsFromConfigs(typescript_eslint.default.configs.recommendedTypeChecked), ...eslint_plugin_vue.default.configs["flat/vue2-recommended"].map((config) => {
|
|
26
26
|
delete config.files;
|
|
@@ -46,4 +46,4 @@ var vue2_typescript_default = require_mergeAllConfig.mergeAll(typescript_eslint.
|
|
|
46
46
|
//#endregion
|
|
47
47
|
exports.default = vue2_typescript_default;
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=vue2-typescript-
|
|
49
|
+
//# sourceMappingURL=vue2-typescript-rJIMzNUI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue2-typescript-
|
|
1
|
+
{"version":3,"file":"vue2-typescript-rJIMzNUI.cjs","names":[],"sources":["../src/configs/vue2-typescript/index.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport js from '@eslint/js';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { configs as airbnbConfigs } from 'eslint-config-airbnb-extended';\nimport { importX } from 'eslint-plugin-import-x';\nimport jsdocPlugin from 'eslint-plugin-jsdoc';\nimport eslintPluginVue from 'eslint-plugin-vue';\nimport eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';\nimport globals from 'globals';\nimport ts from 'typescript-eslint';\nimport { postConfig, preConfig } from '~/base';\nimport core from '~/rules/core';\nimport cspell from '~/rules/cspell';\nimport importRules from '~/rules/importRules';\nimport stylisticRules from '~/rules/stylistic';\nimport typescript from '~/rules/typescript';\nimport { vue2Composition } from '~/rules/vue2';\nimport { vue2Typescript } from '~/rules/vue2-typescript';\nimport { merge } from '~/utils/merge';\nimport { mergeAll } from '~/utils/mergeAllConfig';\nimport { removePluginsFromConfigs } from '~/utils/removePluginsFromConfigs';\n\nexport default mergeAll((\n // eslint-disable-next-line sonarjs/deprecation -- defineConfig from eslint/config has a ConfigWithExtends type incompatible with the vue/typescript-eslint plugin configs in this version\n ts.config(\n js.configs.recommended,\n importX.flatConfigs.recommended,\n ...airbnbConfigs.base.all,\n ...ts.configs.recommended,\n ...removePluginsFromConfigs(ts.configs.recommendedTypeChecked),\n ...eslintPluginVue.configs['flat/vue2-recommended'].map(config => {\n delete config.files;\n\n return config;\n }),\n ...eslintPluginVueScopedCSS.configs['flat/vue2-recommended'],\n jsdocPlugin.configs['flat/recommended-typescript-error'],\n merge<Linter.Config[]>(\n preConfig(),\n core,\n importRules,\n cspell,\n { plugins: { '@stylistic': stylistic } } satisfies Linter.Config,\n stylisticRules,\n vue2Composition,\n typescript,\n vue2Typescript,\n postConfig(),\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n parser: ts.parser,\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n extraFileExtensions: ['.vue'],\n },\n },\n settings: {\n jsdoc: {\n mode: 'typescript',\n tagNamePreference: {\n callback: 'watch',\n desc: 'use',\n },\n },\n },\n }\n )\n )\n) as Linter.Config[]);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAA,0BAAe,uBAAA,SAEX,kBAAA,QAAG,OACC,WAAA,QAAG,QAAQ,aACX,uBAAA,QAAQ,YAAY,aACpB,GAAG,8BAAA,QAAc,KAAK,KACtB,GAAG,kBAAA,QAAG,QAAQ,aACd,GAAG,iCAAA,yBAAyB,kBAAA,QAAG,QAAQ,sBAAsB,GAC7D,GAAG,kBAAA,QAAgB,QAAQ,wBAAwB,CAAC,KAAI,WAAS;CAC7D,OAAO,OAAO;CAEd,OAAO;AACX,CAAC,GACD,GAAG,6BAAA,QAAyB,QAAQ,0BACpC,oBAAA,QAAY,QAAQ,sCACpB,cAAA,MACI,kBAAA,UAAS,GACT,kBAAA,cACA,kBAAA,qBACA,kBAAA,gBACA,EAAE,SAAS,EAAE,cAAc,yBAAA,QAAS,EAAE,GACtC,kBAAA,mBACA,aAAA,iBACA,iCAAA,oBACA,wBAAA,gBACA,kBAAA,WAAU,GACV;CACI,iBAAiB;EACb,SAAS,EACL,GAAG,QAAA,QAAQ,QACd;EACD,eAAe;GACX,QAAQ,kBAAA,QAAG;GACX,YAAY;GACZ,cAAc,EACV,KAAK,KACR;GACD,qBAAqB,CAAC,MAAM;EAC/B;CACJ;CACD,UAAU,EACN,OAAO;EACH,MAAM;EACN,mBAAmB;GACf,UAAU;GACV,MAAM;EACT;CACJ,EACJ;AACJ,CAAA,CACJ,CAEW"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_removedOptions = require("./removedOptions-BYMW8w__.cjs");
|
|
2
2
|
const require_merge = require("./merge-DJQU2y2U.cjs");
|
|
3
3
|
const require_mergeAllConfig = require("./mergeAllConfig-DjMWjBNg.cjs");
|
|
4
|
-
const require_stylistic = require("./stylistic-
|
|
4
|
+
const require_stylistic = require("./stylistic-B2hCwBRu.cjs");
|
|
5
5
|
const require_vue = require("./vue-2Tf2LIPf.cjs");
|
|
6
6
|
let globals = require("globals");
|
|
7
|
-
globals =
|
|
7
|
+
globals = require_removedOptions.__toESM(globals, 1);
|
|
8
8
|
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
9
|
-
_stylistic_eslint_plugin =
|
|
9
|
+
_stylistic_eslint_plugin = require_removedOptions.__toESM(_stylistic_eslint_plugin, 1);
|
|
10
10
|
let eslint_config_airbnb_extended = require("eslint-config-airbnb-extended");
|
|
11
11
|
let eslint_plugin_import_x = require("eslint-plugin-import-x");
|
|
12
12
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
13
|
-
eslint_plugin_jsdoc =
|
|
13
|
+
eslint_plugin_jsdoc = require_removedOptions.__toESM(eslint_plugin_jsdoc, 1);
|
|
14
14
|
let eslint_plugin_vue = require("eslint-plugin-vue");
|
|
15
|
-
eslint_plugin_vue =
|
|
15
|
+
eslint_plugin_vue = require_removedOptions.__toESM(eslint_plugin_vue, 1);
|
|
16
16
|
let eslint_plugin_vue_scoped_css = require("eslint-plugin-vue-scoped-css");
|
|
17
|
-
eslint_plugin_vue_scoped_css =
|
|
17
|
+
eslint_plugin_vue_scoped_css = require_removedOptions.__toESM(eslint_plugin_vue_scoped_css, 1);
|
|
18
18
|
//#region src/configs/vue3/index.ts
|
|
19
19
|
var vue3_default = require_merge.merge(require_mergeAllConfig.mergeAll(eslint_plugin_vue.default.configs["flat/recommended"], eslint_plugin_vue_scoped_css.default.configs["flat/recommended"]), eslint_plugin_import_x.importX.flatConfigs.recommended, require_mergeAllConfig.mergeAll(eslint_config_airbnb_extended.configs.base.recommended), eslint_plugin_jsdoc.default.configs["flat/recommended"], require_stylistic.preConfig(), require_stylistic.core_default, require_stylistic.importRules_default, require_stylistic.cspell_default, { plugins: { "@stylistic": _stylistic_eslint_plugin.default } }, require_stylistic.stylistic_default, require_vue.vue_default, require_stylistic.postConfig(), { languageOptions: {
|
|
20
20
|
parserOptions: {
|
|
@@ -27,4 +27,4 @@ var vue3_default = require_merge.merge(require_mergeAllConfig.mergeAll(eslint_pl
|
|
|
27
27
|
//#endregion
|
|
28
28
|
exports.default = vue3_default;
|
|
29
29
|
|
|
30
|
-
//# sourceMappingURL=vue3-
|
|
30
|
+
//# sourceMappingURL=vue3-DmrGRHbo.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue3-
|
|
1
|
+
{"version":3,"file":"vue3-DmrGRHbo.cjs","names":[],"sources":["../src/configs/vue3/index.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { configs as airbnbConfigs } from 'eslint-config-airbnb-extended';\nimport { importX } from 'eslint-plugin-import-x';\nimport jsdocPlugin from 'eslint-plugin-jsdoc';\nimport pluginVue from 'eslint-plugin-vue';\nimport eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';\nimport globals from 'globals';\nimport { postConfig, preConfig } from '~/base';\nimport core from '~/rules/core';\nimport cspell from '~/rules/cspell';\nimport importRules from '~/rules/importRules';\nimport stylisticRules from '~/rules/stylistic';\nimport vue from '~/rules/vue';\nimport { merge } from '~/utils/merge';\nimport { mergeAll } from '~/utils/mergeAllConfig';\n\nexport default merge(\n mergeAll(\n pluginVue.configs['flat/recommended'],\n eslintPluginVueScopedCSS.configs['flat/recommended'] as Linter.Config[]\n ),\n importX.flatConfigs.recommended as Linter.Config,\n mergeAll(airbnbConfigs.base.recommended),\n jsdocPlugin.configs['flat/recommended'],\n preConfig(),\n core,\n importRules,\n cspell,\n { plugins: { '@stylistic': stylistic } } satisfies Linter.Config,\n stylisticRules,\n vue,\n postConfig(),\n {\n languageOptions: {\n parserOptions: {\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n extraFileExtensions: ['.vue'],\n },\n globals: {\n ...globals.browser,\n },\n },\n } satisfies Linter.Config\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAA,eAAe,cAAA,MACX,uBAAA,SACI,kBAAA,QAAU,QAAQ,qBAClB,6BAAA,QAAyB,QAAQ,mBAAsC,GAE3E,uBAAA,QAAQ,YAAY,aACpB,uBAAA,SAAS,8BAAA,QAAc,KAAK,WAAW,GACvC,oBAAA,QAAY,QAAQ,qBACpB,kBAAA,UAAS,GACT,kBAAA,cACA,kBAAA,qBACA,kBAAA,gBACA,EAAE,SAAS,EAAE,cAAc,yBAAA,QAAS,EAAE,GACtC,kBAAA,mBACA,YAAA,aACA,kBAAA,WAAU,GACV,EACI,iBAAiB;CACb,eAAe;EACX,YAAY;EACZ,cAAc,EACV,KAAK,KACR;EACD,qBAAqB,CAAC,MAAM;CAC/B;CACD,SAAS,EACL,GAAG,QAAA,QAAQ,QACd;AACJ,EACoB,CAAA"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_removedOptions = require("./removedOptions-BYMW8w__.cjs");
|
|
2
2
|
const require_merge = require("./merge-DJQU2y2U.cjs");
|
|
3
3
|
const require_mergeAllConfig = require("./mergeAllConfig-DjMWjBNg.cjs");
|
|
4
|
-
const require_stylistic = require("./stylistic-
|
|
4
|
+
const require_stylistic = require("./stylistic-B2hCwBRu.cjs");
|
|
5
5
|
const require_vue_options_api = require("./vue-options-api-9KoVvBkF.cjs");
|
|
6
6
|
const require_vue = require("./vue-2Tf2LIPf.cjs");
|
|
7
7
|
let globals = require("globals");
|
|
8
|
-
globals =
|
|
8
|
+
globals = require_removedOptions.__toESM(globals, 1);
|
|
9
9
|
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
10
|
-
_stylistic_eslint_plugin =
|
|
10
|
+
_stylistic_eslint_plugin = require_removedOptions.__toESM(_stylistic_eslint_plugin, 1);
|
|
11
11
|
let eslint_config_airbnb_extended = require("eslint-config-airbnb-extended");
|
|
12
12
|
let eslint_plugin_import_x = require("eslint-plugin-import-x");
|
|
13
13
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
14
|
-
eslint_plugin_jsdoc =
|
|
14
|
+
eslint_plugin_jsdoc = require_removedOptions.__toESM(eslint_plugin_jsdoc, 1);
|
|
15
15
|
let eslint_plugin_vue = require("eslint-plugin-vue");
|
|
16
|
-
eslint_plugin_vue =
|
|
16
|
+
eslint_plugin_vue = require_removedOptions.__toESM(eslint_plugin_vue, 1);
|
|
17
17
|
let eslint_plugin_vue_scoped_css = require("eslint-plugin-vue-scoped-css");
|
|
18
|
-
eslint_plugin_vue_scoped_css =
|
|
18
|
+
eslint_plugin_vue_scoped_css = require_removedOptions.__toESM(eslint_plugin_vue_scoped_css, 1);
|
|
19
19
|
//#region src/configs/vue3-options-api/index.ts
|
|
20
20
|
var vue3_options_api_default = require_merge.merge(require_mergeAllConfig.mergeAll(eslint_plugin_vue.default.configs["flat/recommended"], eslint_plugin_vue_scoped_css.default.configs["flat/recommended"]), eslint_plugin_import_x.importX.flatConfigs.recommended, require_mergeAllConfig.mergeAll(eslint_config_airbnb_extended.configs.base.recommended), eslint_plugin_jsdoc.default.configs["flat/recommended"], require_stylistic.preConfig(), require_stylistic.core_default, require_stylistic.importRules_default, require_stylistic.cspell_default, { plugins: { "@stylistic": _stylistic_eslint_plugin.default } }, require_stylistic.stylistic_default, require_vue.vue_default, require_vue_options_api.vueOptionsApi, require_stylistic.postConfig(), { languageOptions: {
|
|
21
21
|
parserOptions: {
|
|
@@ -28,4 +28,4 @@ var vue3_options_api_default = require_merge.merge(require_mergeAllConfig.mergeA
|
|
|
28
28
|
//#endregion
|
|
29
29
|
exports.default = vue3_options_api_default;
|
|
30
30
|
|
|
31
|
-
//# sourceMappingURL=vue3-options-api-
|
|
31
|
+
//# sourceMappingURL=vue3-options-api-DPEk8rBk.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue3-options-api-
|
|
1
|
+
{"version":3,"file":"vue3-options-api-DPEk8rBk.cjs","names":[],"sources":["../src/configs/vue3-options-api/index.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { configs as airbnbConfigs } from 'eslint-config-airbnb-extended';\nimport { importX } from 'eslint-plugin-import-x';\nimport jsdocPlugin from 'eslint-plugin-jsdoc';\nimport pluginVue from 'eslint-plugin-vue';\nimport eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';\nimport globals from 'globals';\nimport { postConfig, preConfig } from '~/base';\nimport core from '~/rules/core';\nimport cspell from '~/rules/cspell';\nimport importRules from '~/rules/importRules';\nimport stylisticRules from '~/rules/stylistic';\nimport vue from '~/rules/vue';\nimport { vueOptionsApi } from '~/rules/vue-options-api';\nimport { merge } from '~/utils/merge';\nimport { mergeAll } from '~/utils/mergeAllConfig';\n\nexport default merge(\n mergeAll(\n pluginVue.configs['flat/recommended'],\n eslintPluginVueScopedCSS.configs['flat/recommended'] as Linter.Config[]\n ),\n importX.flatConfigs.recommended as Linter.Config,\n mergeAll(airbnbConfigs.base.recommended),\n jsdocPlugin.configs['flat/recommended'],\n preConfig(),\n core,\n importRules,\n cspell,\n { plugins: { '@stylistic': stylistic } } satisfies Linter.Config,\n stylisticRules,\n vue,\n vueOptionsApi,\n postConfig(),\n {\n languageOptions: {\n parserOptions: {\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n extraFileExtensions: ['.vue'],\n },\n globals: {\n ...globals.browser,\n },\n },\n } satisfies Linter.Config\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAA,2BAAe,cAAA,MACX,uBAAA,SACI,kBAAA,QAAU,QAAQ,qBAClB,6BAAA,QAAyB,QAAQ,mBAAsC,GAE3E,uBAAA,QAAQ,YAAY,aACpB,uBAAA,SAAS,8BAAA,QAAc,KAAK,WAAW,GACvC,oBAAA,QAAY,QAAQ,qBACpB,kBAAA,UAAS,GACT,kBAAA,cACA,kBAAA,qBACA,kBAAA,gBACA,EAAE,SAAS,EAAE,cAAc,yBAAA,QAAS,EAAE,GACtC,kBAAA,mBACA,YAAA,aACA,wBAAA,eACA,kBAAA,WAAU,GACV,EACI,iBAAiB;CACb,eAAe;EACX,YAAY;EACZ,cAAc,EACV,KAAK,KACR;EACD,qBAAqB,CAAC,MAAM;CAC/B;CACD,SAAS,EACL,GAAG,QAAA,QAAQ,QACd;AACJ,EACoB,CAAA"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_removedOptions = require("./removedOptions-BYMW8w__.cjs");
|
|
2
2
|
const require_merge = require("./merge-DJQU2y2U.cjs");
|
|
3
3
|
const require_mergeAllConfig = require("./mergeAllConfig-DjMWjBNg.cjs");
|
|
4
|
-
const require_stylistic = require("./stylistic-
|
|
4
|
+
const require_stylistic = require("./stylistic-B2hCwBRu.cjs");
|
|
5
5
|
const require_removePluginsFromConfigs = require("./removePluginsFromConfigs-D0oSUj2C.cjs");
|
|
6
6
|
const require_vue = require("./vue-2Tf2LIPf.cjs");
|
|
7
7
|
let globals = require("globals");
|
|
8
|
-
globals =
|
|
8
|
+
globals = require_removedOptions.__toESM(globals, 1);
|
|
9
9
|
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
10
|
-
_stylistic_eslint_plugin =
|
|
10
|
+
_stylistic_eslint_plugin = require_removedOptions.__toESM(_stylistic_eslint_plugin, 1);
|
|
11
11
|
let eslint_config_airbnb_extended = require("eslint-config-airbnb-extended");
|
|
12
12
|
let eslint_plugin_import_x = require("eslint-plugin-import-x");
|
|
13
13
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
14
|
-
eslint_plugin_jsdoc =
|
|
14
|
+
eslint_plugin_jsdoc = require_removedOptions.__toESM(eslint_plugin_jsdoc, 1);
|
|
15
15
|
let _eslint_js = require("@eslint/js");
|
|
16
|
-
_eslint_js =
|
|
16
|
+
_eslint_js = require_removedOptions.__toESM(_eslint_js, 1);
|
|
17
17
|
let typescript_eslint = require("typescript-eslint");
|
|
18
|
-
typescript_eslint =
|
|
18
|
+
typescript_eslint = require_removedOptions.__toESM(typescript_eslint, 1);
|
|
19
19
|
let eslint_plugin_vue = require("eslint-plugin-vue");
|
|
20
|
-
eslint_plugin_vue =
|
|
20
|
+
eslint_plugin_vue = require_removedOptions.__toESM(eslint_plugin_vue, 1);
|
|
21
21
|
let eslint_plugin_vue_scoped_css = require("eslint-plugin-vue-scoped-css");
|
|
22
|
-
eslint_plugin_vue_scoped_css =
|
|
22
|
+
eslint_plugin_vue_scoped_css = require_removedOptions.__toESM(eslint_plugin_vue_scoped_css, 1);
|
|
23
23
|
//#region src/configs/vue3-typescript/index.ts
|
|
24
24
|
var vue3_typescript_default = require_mergeAllConfig.mergeAll(typescript_eslint.default.config(_eslint_js.default.configs.recommended, eslint_plugin_import_x.importX.flatConfigs.recommended, ...eslint_config_airbnb_extended.configs.base.all, ...typescript_eslint.default.configs.recommended, ...require_removePluginsFromConfigs.removePluginsFromConfigs(typescript_eslint.default.configs.recommendedTypeChecked), ...eslint_plugin_vue.default.configs["flat/recommended"].map((config) => {
|
|
25
25
|
delete config.files;
|
|
@@ -45,4 +45,4 @@ var vue3_typescript_default = require_mergeAllConfig.mergeAll(typescript_eslint.
|
|
|
45
45
|
//#endregion
|
|
46
46
|
exports.default = vue3_typescript_default;
|
|
47
47
|
|
|
48
|
-
//# sourceMappingURL=vue3-typescript-
|
|
48
|
+
//# sourceMappingURL=vue3-typescript-Dz5BM0LJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue3-typescript-
|
|
1
|
+
{"version":3,"file":"vue3-typescript-Dz5BM0LJ.cjs","names":[],"sources":["../src/configs/vue3-typescript/index.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport js from '@eslint/js';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { configs as airbnbConfigs } from 'eslint-config-airbnb-extended';\nimport { importX } from 'eslint-plugin-import-x';\nimport jsdocPlugin from 'eslint-plugin-jsdoc';\nimport eslintPluginVue from 'eslint-plugin-vue';\nimport eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';\nimport globals from 'globals';\nimport ts from 'typescript-eslint';\nimport { postConfig, preConfig } from '~/base';\nimport core from '~/rules/core';\nimport cspell from '~/rules/cspell';\nimport importRules from '~/rules/importRules';\nimport stylisticRules from '~/rules/stylistic';\nimport typescript from '~/rules/typescript';\nimport vue from '~/rules/vue';\nimport { merge } from '~/utils/merge';\nimport { mergeAll } from '~/utils/mergeAllConfig';\nimport { removePluginsFromConfigs } from '~/utils/removePluginsFromConfigs';\n\nexport default mergeAll((\n // eslint-disable-next-line sonarjs/deprecation -- defineConfig from eslint/config has a ConfigWithExtends type incompatible with the vue/typescript-eslint plugin configs in this version\n ts.config(\n js.configs.recommended,\n importX.flatConfigs.recommended,\n ...airbnbConfigs.base.all,\n ...ts.configs.recommended,\n ...removePluginsFromConfigs(ts.configs.recommendedTypeChecked),\n ...eslintPluginVue.configs['flat/recommended'].map(config => {\n delete config.files;\n\n return config;\n }),\n ...eslintPluginVueScopedCSS.configs['flat/recommended'],\n jsdocPlugin.configs['flat/recommended-typescript-error'],\n merge<Linter.Config[]>(\n preConfig(),\n core,\n importRules,\n cspell,\n { plugins: { '@stylistic': stylistic } } satisfies Linter.Config,\n stylisticRules,\n vue,\n typescript,\n postConfig(),\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n parser: ts.parser,\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n extraFileExtensions: ['.vue'],\n },\n },\n settings: {\n jsdoc: {\n mode: 'typescript',\n tagNamePreference: {\n callback: 'watch',\n desc: 'use',\n },\n },\n },\n }\n )\n )\n) as Linter.Config[]);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAA,0BAAe,uBAAA,SAEX,kBAAA,QAAG,OACC,WAAA,QAAG,QAAQ,aACX,uBAAA,QAAQ,YAAY,aACpB,GAAG,8BAAA,QAAc,KAAK,KACtB,GAAG,kBAAA,QAAG,QAAQ,aACd,GAAG,iCAAA,yBAAyB,kBAAA,QAAG,QAAQ,sBAAsB,GAC7D,GAAG,kBAAA,QAAgB,QAAQ,mBAAmB,CAAC,KAAI,WAAS;CACxD,OAAO,OAAO;CAEd,OAAO;AACX,CAAC,GACD,GAAG,6BAAA,QAAyB,QAAQ,qBACpC,oBAAA,QAAY,QAAQ,sCACpB,cAAA,MACI,kBAAA,UAAS,GACT,kBAAA,cACA,kBAAA,qBACA,kBAAA,gBACA,EAAE,SAAS,EAAE,cAAc,yBAAA,QAAS,EAAE,GACtC,kBAAA,mBACA,YAAA,aACA,iCAAA,oBACA,kBAAA,WAAU,GACV;CACI,iBAAiB;EACb,SAAS,EACL,GAAG,QAAA,QAAQ,QACd;EACD,eAAe;GACX,QAAQ,kBAAA,QAAG;GACX,YAAY;GACZ,cAAc,EACV,KAAK,KACR;GACD,qBAAqB,CAAC,MAAM;EAC/B;CACJ;CACD,UAAU,EACN,OAAO;EACH,MAAM;EACN,mBAAmB;GACf,UAAU;GACV,MAAM;EACT;CACJ,EACJ;AACJ,CAAA,CACJ,CAEW"}
|
package/dist/{vue3-typescript-options-api-D4pqpDFs.cjs → vue3-typescript-options-api-DiYz_vVd.cjs}
RENAMED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_removedOptions = require("./removedOptions-BYMW8w__.cjs");
|
|
2
2
|
const require_merge = require("./merge-DJQU2y2U.cjs");
|
|
3
3
|
const require_mergeAllConfig = require("./mergeAllConfig-DjMWjBNg.cjs");
|
|
4
|
-
const require_stylistic = require("./stylistic-
|
|
4
|
+
const require_stylistic = require("./stylistic-B2hCwBRu.cjs");
|
|
5
5
|
const require_removePluginsFromConfigs = require("./removePluginsFromConfigs-D0oSUj2C.cjs");
|
|
6
6
|
const require_vue_options_api = require("./vue-options-api-9KoVvBkF.cjs");
|
|
7
7
|
const require_vue = require("./vue-2Tf2LIPf.cjs");
|
|
8
8
|
let globals = require("globals");
|
|
9
|
-
globals =
|
|
9
|
+
globals = require_removedOptions.__toESM(globals, 1);
|
|
10
10
|
let _stylistic_eslint_plugin = require("@stylistic/eslint-plugin");
|
|
11
|
-
_stylistic_eslint_plugin =
|
|
11
|
+
_stylistic_eslint_plugin = require_removedOptions.__toESM(_stylistic_eslint_plugin, 1);
|
|
12
12
|
let eslint_config_airbnb_extended = require("eslint-config-airbnb-extended");
|
|
13
13
|
let eslint_plugin_import_x = require("eslint-plugin-import-x");
|
|
14
14
|
let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
15
|
-
eslint_plugin_jsdoc =
|
|
15
|
+
eslint_plugin_jsdoc = require_removedOptions.__toESM(eslint_plugin_jsdoc, 1);
|
|
16
16
|
let _eslint_js = require("@eslint/js");
|
|
17
|
-
_eslint_js =
|
|
17
|
+
_eslint_js = require_removedOptions.__toESM(_eslint_js, 1);
|
|
18
18
|
let typescript_eslint = require("typescript-eslint");
|
|
19
|
-
typescript_eslint =
|
|
19
|
+
typescript_eslint = require_removedOptions.__toESM(typescript_eslint, 1);
|
|
20
20
|
let eslint_plugin_vue = require("eslint-plugin-vue");
|
|
21
|
-
eslint_plugin_vue =
|
|
21
|
+
eslint_plugin_vue = require_removedOptions.__toESM(eslint_plugin_vue, 1);
|
|
22
22
|
let eslint_plugin_vue_scoped_css = require("eslint-plugin-vue-scoped-css");
|
|
23
|
-
eslint_plugin_vue_scoped_css =
|
|
23
|
+
eslint_plugin_vue_scoped_css = require_removedOptions.__toESM(eslint_plugin_vue_scoped_css, 1);
|
|
24
24
|
//#region src/configs/vue3-typescript-options-api/index.ts
|
|
25
25
|
var vue3_typescript_options_api_default = require_mergeAllConfig.mergeAll(typescript_eslint.default.config(_eslint_js.default.configs.recommended, eslint_plugin_import_x.importX.flatConfigs.recommended, ...eslint_config_airbnb_extended.configs.base.all, ...typescript_eslint.default.configs.recommended, ...require_removePluginsFromConfigs.removePluginsFromConfigs(typescript_eslint.default.configs.recommendedTypeChecked), ...eslint_plugin_vue.default.configs["flat/recommended"].map((config) => {
|
|
26
26
|
delete config.files;
|
|
@@ -46,4 +46,4 @@ var vue3_typescript_options_api_default = require_mergeAllConfig.mergeAll(typesc
|
|
|
46
46
|
//#endregion
|
|
47
47
|
exports.default = vue3_typescript_options_api_default;
|
|
48
48
|
|
|
49
|
-
//# sourceMappingURL=vue3-typescript-options-api-
|
|
49
|
+
//# sourceMappingURL=vue3-typescript-options-api-DiYz_vVd.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue3-typescript-options-api-
|
|
1
|
+
{"version":3,"file":"vue3-typescript-options-api-DiYz_vVd.cjs","names":[],"sources":["../src/configs/vue3-typescript-options-api/index.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport js from '@eslint/js';\nimport stylistic from '@stylistic/eslint-plugin';\nimport { configs as airbnbConfigs } from 'eslint-config-airbnb-extended';\nimport { importX } from 'eslint-plugin-import-x';\nimport jsdocPlugin from 'eslint-plugin-jsdoc';\nimport eslintPluginVue from 'eslint-plugin-vue';\nimport eslintPluginVueScopedCSS from 'eslint-plugin-vue-scoped-css';\nimport globals from 'globals';\nimport ts from 'typescript-eslint';\nimport { postConfig, preConfig } from '~/base';\nimport core from '~/rules/core';\nimport cspell from '~/rules/cspell';\nimport importRules from '~/rules/importRules';\nimport stylisticRules from '~/rules/stylistic';\nimport typescript from '~/rules/typescript';\nimport vue from '~/rules/vue';\nimport { vueOptionsApi } from '~/rules/vue-options-api';\nimport { merge } from '~/utils/merge';\nimport { mergeAll } from '~/utils/mergeAllConfig';\nimport { removePluginsFromConfigs } from '~/utils/removePluginsFromConfigs';\n\nexport default mergeAll((\n // eslint-disable-next-line sonarjs/deprecation -- defineConfig from eslint/config has a ConfigWithExtends type incompatible with the vue/typescript-eslint plugin configs in this version\n ts.config(\n js.configs.recommended,\n importX.flatConfigs.recommended,\n ...airbnbConfigs.base.all,\n ...ts.configs.recommended,\n ...removePluginsFromConfigs(ts.configs.recommendedTypeChecked),\n ...eslintPluginVue.configs['flat/recommended'].map(config => {\n delete config.files;\n\n return config;\n }),\n ...eslintPluginVueScopedCSS.configs['flat/recommended'],\n jsdocPlugin.configs['flat/recommended-typescript-error'],\n merge<Linter.Config[]>(\n preConfig(),\n core,\n importRules,\n cspell,\n { plugins: { '@stylistic': stylistic } } satisfies Linter.Config,\n stylisticRules,\n vue,\n typescript,\n vueOptionsApi,\n postConfig(),\n {\n languageOptions: {\n globals: {\n ...globals.browser,\n },\n parserOptions: {\n parser: ts.parser,\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n extraFileExtensions: ['.vue'],\n },\n },\n settings: {\n jsdoc: {\n mode: 'typescript',\n tagNamePreference: {\n callback: 'watch',\n desc: 'use',\n },\n },\n },\n }\n )\n )\n) as Linter.Config[]);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAA,sCAAe,uBAAA,SAEX,kBAAA,QAAG,OACC,WAAA,QAAG,QAAQ,aACX,uBAAA,QAAQ,YAAY,aACpB,GAAG,8BAAA,QAAc,KAAK,KACtB,GAAG,kBAAA,QAAG,QAAQ,aACd,GAAG,iCAAA,yBAAyB,kBAAA,QAAG,QAAQ,sBAAsB,GAC7D,GAAG,kBAAA,QAAgB,QAAQ,mBAAmB,CAAC,KAAI,WAAS;CACxD,OAAO,OAAO;CAEd,OAAO;AACX,CAAC,GACD,GAAG,6BAAA,QAAyB,QAAQ,qBACpC,oBAAA,QAAY,QAAQ,sCACpB,cAAA,MACI,kBAAA,UAAS,GACT,kBAAA,cACA,kBAAA,qBACA,kBAAA,gBACA,EAAE,SAAS,EAAE,cAAc,yBAAA,QAAS,EAAE,GACtC,kBAAA,mBACA,YAAA,aACA,iCAAA,oBACA,wBAAA,eACA,kBAAA,WAAU,GACV;CACI,iBAAiB;EACb,SAAS,EACL,GAAG,QAAA,QAAQ,QACd;EACD,eAAe;GACX,QAAQ,kBAAA,QAAG;GACX,YAAY;GACZ,cAAc,EACV,KAAK,KACR;GACD,qBAAqB,CAAC,MAAM;EAC/B;CACJ;CACD,UAAU,EACN,OAAO;EACH,MAAM;EACN,mBAAmB;GACf,UAAU;GACV,MAAM;EACT;CACJ,EACJ;AACJ,CAAA,CACJ,CAEW"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-beta.
|
|
4
|
+
"version": "4.0.0-beta.4",
|
|
5
5
|
"description": "A collection of ESLint configurations provided by @useinsider, offering support for various environments including Vanilla JS, TypeScript, and framework-specific setups such as Vue 3.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"useinsider",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oxlintOwnership-7hpdB3d1.cjs","names":[],"sources":["../src/builders/oxlintOwnership.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport oxlintPlugin from 'eslint-plugin-oxlint';\nimport * as rulesByCategory from 'eslint-plugin-oxlint/rules-by-category';\nimport * as rulesByScope from 'eslint-plugin-oxlint/rules-by-scope';\n\nconst ESLINT_IMPORT_PREFIX = 'import-x/';\nconst OXLINT_IMPORT_PREFIX = 'import/';\nconst ESLINT_TYPESCRIPT_PREFIX = '@typescript-eslint/';\nconst OXLINT_TYPESCRIPT_PREFIX = 'typescript/';\n\nexport const VUE_LIKE_GLOBS: readonly string[] = ['**/*.vue', '**/*.svelte', '**/*.astro'];\n\nexport const OXLINT_CATEGORIES: readonly string[] = [\n 'correctness',\n 'suspicious',\n 'pedantic',\n 'perf',\n 'style',\n 'restriction',\n 'nursery',\n];\n\n// oxlint has no equivalent of flat-config `settings`, so any rule whose ESLint behavior is driven\n// by a settings key stays on the ESLint side. `jsdoc/check-tag-names` reads\n// `settings.jsdoc.tagNamePreference`, which the TypeScript presets use to remap `@desc`/`@callback`\n// onto `@use`/`@watch`; oxlint rejects both of those tags outright.\nexport const SETTINGS_DEPENDENT_RULES: readonly string[] = ['jsdoc/check-tag-names'];\n\n// Rules both linters implement, but whose omitted options resolve to different defaults — a bare\n// `'error'` therefore means something stricter under oxlint. `no-inner-declarations` defaults\n// `blockScopedFunctions` to `'allow'` in ESLint 9 and to `'disallow'` in oxlint, so handing oxlint\n// the preset's `'error'` would reject every block-scoped function declaration ESLint accepts.\nexport const DEFAULT_DIVERGENT_RULES: readonly string[] = ['no-inner-declarations'];\n\n// `eslint-plugin-oxlint` re-enables these for SFC-like files because oxlint cannot parse their\n// templates. Kept as a floor under the value derived from the plugin at runtime so a shape change\n// upstream can never silently drop the exception.\nconst VUE_UNSAFE_FALLBACK: readonly string[] = [\n 'no-unused-vars',\n '@typescript-eslint/no-unused-vars',\n '@typescript-eslint/consistent-type-imports',\n 'react-hooks/rules-of-hooks',\n];\n\nconst eslintPrefixToOxlintPlugin: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n};\n\nfunction collectRuleNames (namespace: Record<string, unknown>): string[] {\n return Object.values(namespace).flatMap(value => {\n if (typeof value !== 'object' || value === null) {\n return [];\n }\n\n const entries = Object.entries(value as Record<string, unknown>);\n const isRuleRecord = entries.length > 0 && entries.every(([, severity]) => severity === 'off');\n\n return isRuleRecord ? entries.map(([rule]) => rule) : [];\n });\n}\n\nfunction pickNamespace (\n namespace: Record<string, unknown>,\n matches: (key: string) => boolean\n): Record<string, unknown> {\n return Object.fromEntries(Object.entries(namespace).filter(([key]) => matches(key)));\n}\n\nconst categoryNamespace = rulesByCategory as Record<string, unknown>;\nconst scopeNamespace = rulesByScope as Record<string, unknown>;\nconst implementedRules = new Set(collectRuleNames(scopeNamespace));\n\n// Type-aware rules need `oxlint-tsgolint`, which this stage does not wire up, and nursery rules are\n// exempt from oxlint's semver guarantees. Both stay with ESLint.\nconst excludedRules = new Set([\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(scopeNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery'))),\n ...SETTINGS_DEPENDENT_RULES,\n ...DEFAULT_DIVERGENT_RULES,\n]);\n\n/**\n * The rules `eslint-plugin-oxlint` re-enables for `.vue`/`.svelte`/`.astro`, read from the plugin's\n * own `flat/all` split so the list tracks upstream instead of being hand-maintained.\n * @example\n * readVueUnsafeRules().includes('@typescript-eslint/no-unused-vars'); // true\n */\nexport function readVueUnsafeRules (): string[] {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n const derived = exceptions?.rules ? Object.keys(exceptions.rules) : [];\n\n return [...new Set([...derived, ...VUE_UNSAFE_FALLBACK])];\n}\n\nconst vueUnsafeRules = new Set(readVueUnsafeRules());\n\nfunction normalizeToOxlintNamespace (eslintRuleName: string): string {\n return eslintRuleName.startsWith(ESLINT_IMPORT_PREFIX)\n ? `${OXLINT_IMPORT_PREFIX}${eslintRuleName.slice(ESLINT_IMPORT_PREFIX.length)}`\n : eslintRuleName;\n}\n\n/**\n * Whether oxlint owns this ESLint rule in the current split — implemented natively, not type-aware,\n * not nursery, and not driven by a flat-config `settings` key oxlint cannot read.\n * @example\n * isOxlintOwned('import-x/no-duplicates'); // true — oxlint implements it as `import/no-duplicates`\n * isOxlintOwned('sonarjs/no-identical-functions'); // false\n */\nexport function isOxlintOwned (eslintRuleName: string): boolean {\n const normalized = normalizeToOxlintNamespace(eslintRuleName);\n\n return implementedRules.has(normalized) && !excludedRules.has(normalized);\n}\n\n/**\n * Whether ESLint must keep running this rule on SFC-like files because oxlint cannot parse their\n * templates. Callers must exclude `**\\/*.vue`, `**\\/*.svelte` and `**\\/*.astro` from its suppression.\n * @example\n * isVueUnsafeRule('@typescript-eslint/no-unused-vars'); // true\n */\nexport function isVueUnsafeRule (eslintRuleName: string): boolean {\n return vueUnsafeRules.has(normalizeToOxlintNamespace(eslintRuleName));\n}\n\n/**\n * Translates an ESLint rule name into the name oxlint accepts in its config.\n * @example\n * toOxlintRuleName('no-var'); // 'eslint/no-var'\n * toOxlintRuleName('import-x/first'); // 'import/first'\n * toOxlintRuleName('@typescript-eslint/array-type'); // 'typescript/array-type'\n */\nexport function toOxlintRuleName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return `eslint/${eslintRuleName}`;\n }\n\n if (eslintRuleName.startsWith(ESLINT_TYPESCRIPT_PREFIX)) {\n return `${OXLINT_TYPESCRIPT_PREFIX}${eslintRuleName.slice(ESLINT_TYPESCRIPT_PREFIX.length)}`;\n }\n\n return normalizeToOxlintNamespace(eslintRuleName);\n}\n\n/**\n * The oxlint plugin id that must appear in the config's `plugins` array for a rule to be loaded.\n * @example\n * toOxlintPluginName('import-x/first'); // 'import'\n * toOxlintPluginName('no-var'); // 'eslint'\n */\nexport function toOxlintPluginName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return 'eslint';\n }\n\n const prefix = eslintRuleName.slice(0, eslintRuleName.lastIndexOf('/'));\n\n return eslintPrefixToOxlintPlugin[prefix] ?? prefix;\n}\n\nexport function isRuleDisabled (entry: Linter.RuleEntry | undefined): boolean {\n if (entry === undefined) {\n return true;\n }\n\n const [severity] = Array.isArray(entry) ? entry : [entry];\n\n return severity === 'off' || severity === 0;\n}\n\n/* v8 ignore start */\nif (import.meta.vitest) {\n const { describe, test, expect } = import.meta.vitest;\n\n describe('isOxlintOwned', () => {\n test('claims a natively implemented core rule', () => {\n expect(isOxlintOwned('no-var')).toBe(true);\n });\n\n test('claims an import-x rule through the import-x → import alias', () => {\n expect(isOxlintOwned('import-x/no-duplicates')).toBe(true);\n });\n\n test('leaves type-aware typescript rules with ESLint', () => {\n expect(isOxlintOwned('@typescript-eslint/no-floating-promises')).toBe(false);\n });\n\n test('leaves rules oxlint does not implement with ESLint', () => {\n expect(isOxlintOwned('sonarjs/no-identical-functions')).toBe(false);\n expect(isOxlintOwned('@stylistic/indent')).toBe(false);\n expect(isOxlintOwned('@cspell/spellchecker')).toBe(false);\n });\n\n test('leaves settings-dependent rules with ESLint', () => {\n expect(isOxlintOwned('jsdoc/check-tag-names')).toBe(false);\n });\n\n test('leaves rules whose omitted options resolve to different defaults with ESLint', () => {\n expect(DEFAULT_DIVERGENT_RULES.every(rule => !isOxlintOwned(rule))).toBe(true);\n expect(isOxlintOwned('no-inner-declarations')).toBe(false);\n });\n\n const nurseryRules = collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery')));\n\n test('reads a non-empty nursery namespace, so the exclusion below is not vacuous', () => {\n expect(nurseryRules.length).toBeGreaterThan(0);\n });\n\n test('leaves every nursery rule with ESLint, since nursery is exempt from oxlint semver', () => {\n expect(nurseryRules.filter(rule => isOxlintOwned(rule))).toStrictEqual([]);\n });\n });\n\n describe('isVueUnsafeRule', () => {\n test.each([...VUE_UNSAFE_FALLBACK])('keeps %s with ESLint inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(true);\n });\n\n test.each([\n 'no-var',\n 'no-console',\n 'sonarjs/no-identical-functions',\n ])('lets oxlint keep %s inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(false);\n });\n\n test('does not read an import-x rule as the bare ESLint rule of the same suffix', () => {\n expect(isVueUnsafeRule('import-x/no-unused-vars')).toBe(false);\n });\n });\n\n describe('toOxlintRuleName', () => {\n test.each([\n ['no-var', 'eslint/no-var'],\n ['import-x/first', 'import/first'],\n ['@typescript-eslint/array-type', 'typescript/array-type'],\n ['jsdoc/empty-tags', 'jsdoc/empty-tags'],\n ['vue/no-dupe-keys', 'vue/no-dupe-keys'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintRuleName(eslintName)).toBe(expected);\n });\n });\n\n describe('toOxlintPluginName', () => {\n const expectedPluginByPrefix: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n };\n\n const byName = (left: string, right: string): number => left.localeCompare(right);\n\n test('names every prefix the remap table carries, so no entry goes unexercised', () => {\n expect(Object.keys(expectedPluginByPrefix).sort(byName))\n .toStrictEqual(Object.keys(eslintPrefixToOxlintPlugin).sort(byName));\n });\n\n test.each(Object.entries(expectedPluginByPrefix))(\n 'a %s rule loads the %s plugin',\n (prefix, plugin) => {\n expect(toOxlintPluginName(`${prefix}/some-rule`)).toBe(plugin);\n }\n );\n\n test.each([\n ['no-var', 'eslint'],\n ['jsdoc/empty-tags', 'jsdoc'],\n ['vitest/no-focused-tests', 'vitest'],\n ['vue/no-dupe-keys', 'vue'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintPluginName(eslintName)).toBe(expected);\n });\n });\n\n describe('readVueUnsafeRules', () => {\n test('derives the upstream exception list rather than only the pinned fallback', () => {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n\n expect(exceptions?.rules).toBeDefined();\n expect(Object.keys(exceptions?.rules ?? {}).length).toBeGreaterThan(0);\n });\n\n test('covers every rule oxlint cannot check inside an SFC', () => {\n expect(readVueUnsafeRules()).toEqual(expect.arrayContaining([...VUE_UNSAFE_FALLBACK]));\n });\n });\n\n describe('isRuleDisabled', () => {\n test.each([\n [undefined, true],\n ['off' as Linter.RuleEntry, true],\n [0 as Linter.RuleEntry, true],\n [['off'] as Linter.RuleEntry, true],\n ['error' as Linter.RuleEntry, false],\n [['error', { allow: [] }] as Linter.RuleEntry, false],\n [2 as Linter.RuleEntry, false],\n ])('%s → %s', (entry, expected) => {\n expect(isRuleDisabled(entry)).toBe(expected);\n });\n });\n}\n"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"oxlintOwnership-Cx0hgA_J.js","names":[],"sources":["../src/builders/oxlintOwnership.ts"],"sourcesContent":["import type { Linter } from 'eslint';\nimport oxlintPlugin from 'eslint-plugin-oxlint';\nimport * as rulesByCategory from 'eslint-plugin-oxlint/rules-by-category';\nimport * as rulesByScope from 'eslint-plugin-oxlint/rules-by-scope';\n\nconst ESLINT_IMPORT_PREFIX = 'import-x/';\nconst OXLINT_IMPORT_PREFIX = 'import/';\nconst ESLINT_TYPESCRIPT_PREFIX = '@typescript-eslint/';\nconst OXLINT_TYPESCRIPT_PREFIX = 'typescript/';\n\nexport const VUE_LIKE_GLOBS: readonly string[] = ['**/*.vue', '**/*.svelte', '**/*.astro'];\n\nexport const OXLINT_CATEGORIES: readonly string[] = [\n 'correctness',\n 'suspicious',\n 'pedantic',\n 'perf',\n 'style',\n 'restriction',\n 'nursery',\n];\n\n// oxlint has no equivalent of flat-config `settings`, so any rule whose ESLint behavior is driven\n// by a settings key stays on the ESLint side. `jsdoc/check-tag-names` reads\n// `settings.jsdoc.tagNamePreference`, which the TypeScript presets use to remap `@desc`/`@callback`\n// onto `@use`/`@watch`; oxlint rejects both of those tags outright.\nexport const SETTINGS_DEPENDENT_RULES: readonly string[] = ['jsdoc/check-tag-names'];\n\n// Rules both linters implement, but whose omitted options resolve to different defaults — a bare\n// `'error'` therefore means something stricter under oxlint. `no-inner-declarations` defaults\n// `blockScopedFunctions` to `'allow'` in ESLint 9 and to `'disallow'` in oxlint, so handing oxlint\n// the preset's `'error'` would reject every block-scoped function declaration ESLint accepts.\nexport const DEFAULT_DIVERGENT_RULES: readonly string[] = ['no-inner-declarations'];\n\n// `eslint-plugin-oxlint` re-enables these for SFC-like files because oxlint cannot parse their\n// templates. Kept as a floor under the value derived from the plugin at runtime so a shape change\n// upstream can never silently drop the exception.\nconst VUE_UNSAFE_FALLBACK: readonly string[] = [\n 'no-unused-vars',\n '@typescript-eslint/no-unused-vars',\n '@typescript-eslint/consistent-type-imports',\n 'react-hooks/rules-of-hooks',\n];\n\nconst eslintPrefixToOxlintPlugin: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n};\n\nfunction collectRuleNames (namespace: Record<string, unknown>): string[] {\n return Object.values(namespace).flatMap(value => {\n if (typeof value !== 'object' || value === null) {\n return [];\n }\n\n const entries = Object.entries(value as Record<string, unknown>);\n const isRuleRecord = entries.length > 0 && entries.every(([, severity]) => severity === 'off');\n\n return isRuleRecord ? entries.map(([rule]) => rule) : [];\n });\n}\n\nfunction pickNamespace (\n namespace: Record<string, unknown>,\n matches: (key: string) => boolean\n): Record<string, unknown> {\n return Object.fromEntries(Object.entries(namespace).filter(([key]) => matches(key)));\n}\n\nconst categoryNamespace = rulesByCategory as Record<string, unknown>;\nconst scopeNamespace = rulesByScope as Record<string, unknown>;\nconst implementedRules = new Set(collectRuleNames(scopeNamespace));\n\n// Type-aware rules need `oxlint-tsgolint`, which this stage does not wire up, and nursery rules are\n// exempt from oxlint's semver guarantees. Both stay with ESLint.\nconst excludedRules = new Set([\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(scopeNamespace, key => key.endsWith('TypeAwareRules'))),\n ...collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery'))),\n ...SETTINGS_DEPENDENT_RULES,\n ...DEFAULT_DIVERGENT_RULES,\n]);\n\n/**\n * The rules `eslint-plugin-oxlint` re-enables for `.vue`/`.svelte`/`.astro`, read from the plugin's\n * own `flat/all` split so the list tracks upstream instead of being hand-maintained.\n * @example\n * readVueUnsafeRules().includes('@typescript-eslint/no-unused-vars'); // true\n */\nexport function readVueUnsafeRules (): string[] {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n const derived = exceptions?.rules ? Object.keys(exceptions.rules) : [];\n\n return [...new Set([...derived, ...VUE_UNSAFE_FALLBACK])];\n}\n\nconst vueUnsafeRules = new Set(readVueUnsafeRules());\n\nfunction normalizeToOxlintNamespace (eslintRuleName: string): string {\n return eslintRuleName.startsWith(ESLINT_IMPORT_PREFIX)\n ? `${OXLINT_IMPORT_PREFIX}${eslintRuleName.slice(ESLINT_IMPORT_PREFIX.length)}`\n : eslintRuleName;\n}\n\n/**\n * Whether oxlint owns this ESLint rule in the current split — implemented natively, not type-aware,\n * not nursery, and not driven by a flat-config `settings` key oxlint cannot read.\n * @example\n * isOxlintOwned('import-x/no-duplicates'); // true — oxlint implements it as `import/no-duplicates`\n * isOxlintOwned('sonarjs/no-identical-functions'); // false\n */\nexport function isOxlintOwned (eslintRuleName: string): boolean {\n const normalized = normalizeToOxlintNamespace(eslintRuleName);\n\n return implementedRules.has(normalized) && !excludedRules.has(normalized);\n}\n\n/**\n * Whether ESLint must keep running this rule on SFC-like files because oxlint cannot parse their\n * templates. Callers must exclude `**\\/*.vue`, `**\\/*.svelte` and `**\\/*.astro` from its suppression.\n * @example\n * isVueUnsafeRule('@typescript-eslint/no-unused-vars'); // true\n */\nexport function isVueUnsafeRule (eslintRuleName: string): boolean {\n return vueUnsafeRules.has(normalizeToOxlintNamespace(eslintRuleName));\n}\n\n/**\n * Translates an ESLint rule name into the name oxlint accepts in its config.\n * @example\n * toOxlintRuleName('no-var'); // 'eslint/no-var'\n * toOxlintRuleName('import-x/first'); // 'import/first'\n * toOxlintRuleName('@typescript-eslint/array-type'); // 'typescript/array-type'\n */\nexport function toOxlintRuleName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return `eslint/${eslintRuleName}`;\n }\n\n if (eslintRuleName.startsWith(ESLINT_TYPESCRIPT_PREFIX)) {\n return `${OXLINT_TYPESCRIPT_PREFIX}${eslintRuleName.slice(ESLINT_TYPESCRIPT_PREFIX.length)}`;\n }\n\n return normalizeToOxlintNamespace(eslintRuleName);\n}\n\n/**\n * The oxlint plugin id that must appear in the config's `plugins` array for a rule to be loaded.\n * @example\n * toOxlintPluginName('import-x/first'); // 'import'\n * toOxlintPluginName('no-var'); // 'eslint'\n */\nexport function toOxlintPluginName (eslintRuleName: string): string {\n if (!eslintRuleName.includes('/')) {\n return 'eslint';\n }\n\n const prefix = eslintRuleName.slice(0, eslintRuleName.lastIndexOf('/'));\n\n return eslintPrefixToOxlintPlugin[prefix] ?? prefix;\n}\n\nexport function isRuleDisabled (entry: Linter.RuleEntry | undefined): boolean {\n if (entry === undefined) {\n return true;\n }\n\n const [severity] = Array.isArray(entry) ? entry : [entry];\n\n return severity === 'off' || severity === 0;\n}\n\n/* v8 ignore start */\nif (import.meta.vitest) {\n const { describe, test, expect } = import.meta.vitest;\n\n describe('isOxlintOwned', () => {\n test('claims a natively implemented core rule', () => {\n expect(isOxlintOwned('no-var')).toBe(true);\n });\n\n test('claims an import-x rule through the import-x → import alias', () => {\n expect(isOxlintOwned('import-x/no-duplicates')).toBe(true);\n });\n\n test('leaves type-aware typescript rules with ESLint', () => {\n expect(isOxlintOwned('@typescript-eslint/no-floating-promises')).toBe(false);\n });\n\n test('leaves rules oxlint does not implement with ESLint', () => {\n expect(isOxlintOwned('sonarjs/no-identical-functions')).toBe(false);\n expect(isOxlintOwned('@stylistic/indent')).toBe(false);\n expect(isOxlintOwned('@cspell/spellchecker')).toBe(false);\n });\n\n test('leaves settings-dependent rules with ESLint', () => {\n expect(isOxlintOwned('jsdoc/check-tag-names')).toBe(false);\n });\n\n test('leaves rules whose omitted options resolve to different defaults with ESLint', () => {\n expect(DEFAULT_DIVERGENT_RULES.every(rule => !isOxlintOwned(rule))).toBe(true);\n expect(isOxlintOwned('no-inner-declarations')).toBe(false);\n });\n\n const nurseryRules = collectRuleNames(pickNamespace(categoryNamespace, key => key.startsWith('nursery')));\n\n test('reads a non-empty nursery namespace, so the exclusion below is not vacuous', () => {\n expect(nurseryRules.length).toBeGreaterThan(0);\n });\n\n test('leaves every nursery rule with ESLint, since nursery is exempt from oxlint semver', () => {\n expect(nurseryRules.filter(rule => isOxlintOwned(rule))).toStrictEqual([]);\n });\n });\n\n describe('isVueUnsafeRule', () => {\n test.each([...VUE_UNSAFE_FALLBACK])('keeps %s with ESLint inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(true);\n });\n\n test.each([\n 'no-var',\n 'no-console',\n 'sonarjs/no-identical-functions',\n ])('lets oxlint keep %s inside single-file components', ruleName => {\n expect(isVueUnsafeRule(ruleName)).toBe(false);\n });\n\n test('does not read an import-x rule as the bare ESLint rule of the same suffix', () => {\n expect(isVueUnsafeRule('import-x/no-unused-vars')).toBe(false);\n });\n });\n\n describe('toOxlintRuleName', () => {\n test.each([\n ['no-var', 'eslint/no-var'],\n ['import-x/first', 'import/first'],\n ['@typescript-eslint/array-type', 'typescript/array-type'],\n ['jsdoc/empty-tags', 'jsdoc/empty-tags'],\n ['vue/no-dupe-keys', 'vue/no-dupe-keys'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintRuleName(eslintName)).toBe(expected);\n });\n });\n\n describe('toOxlintPluginName', () => {\n const expectedPluginByPrefix: Readonly<Record<string, string>> = {\n 'import-x': 'import',\n import: 'import',\n '@typescript-eslint': 'typescript',\n n: 'node',\n '@next/next': 'nextjs',\n 'react-hooks': 'react',\n 'react-perf': 'react-perf',\n 'jsx-a11y': 'jsx-a11y',\n };\n\n const byName = (left: string, right: string): number => left.localeCompare(right);\n\n test('names every prefix the remap table carries, so no entry goes unexercised', () => {\n expect(Object.keys(expectedPluginByPrefix).sort(byName))\n .toStrictEqual(Object.keys(eslintPrefixToOxlintPlugin).sort(byName));\n });\n\n test.each(Object.entries(expectedPluginByPrefix))(\n 'a %s rule loads the %s plugin',\n (prefix, plugin) => {\n expect(toOxlintPluginName(`${prefix}/some-rule`)).toBe(plugin);\n }\n );\n\n test.each([\n ['no-var', 'eslint'],\n ['jsdoc/empty-tags', 'jsdoc'],\n ['vitest/no-focused-tests', 'vitest'],\n ['vue/no-dupe-keys', 'vue'],\n ])('%s → %s', (eslintName, expected) => {\n expect(toOxlintPluginName(eslintName)).toBe(expected);\n });\n });\n\n describe('readVueUnsafeRules', () => {\n test('derives the upstream exception list rather than only the pinned fallback', () => {\n const [, exceptions] = oxlintPlugin.configs['flat/all'];\n\n expect(exceptions?.rules).toBeDefined();\n expect(Object.keys(exceptions?.rules ?? {}).length).toBeGreaterThan(0);\n });\n\n test('covers every rule oxlint cannot check inside an SFC', () => {\n expect(readVueUnsafeRules()).toEqual(expect.arrayContaining([...VUE_UNSAFE_FALLBACK]));\n });\n });\n\n describe('isRuleDisabled', () => {\n test.each([\n [undefined, true],\n ['off' as Linter.RuleEntry, true],\n [0 as Linter.RuleEntry, true],\n [['off'] as Linter.RuleEntry, true],\n ['error' as Linter.RuleEntry, false],\n [['error', { allow: [] }] as Linter.RuleEntry, false],\n [2 as Linter.RuleEntry, false],\n ])('%s → %s', (entry, expected) => {\n expect(isRuleDisabled(entry)).toBe(expected);\n });\n });\n}\n"],"mappings":";;;;AAKA,IAAM,uBAAuB;AAC7B,IAAM,uBAAuB;AAC7B,IAAM,2BAA2B;AACjC,IAAM,2BAA2B;AAEjC,IAAa,iBAAoC;CAAC;CAAY;CAAe;AAAY;AAEzF,IAAa,oBAAuC;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;AACH;AAMD,IAAa,2BAA8C,CAAC,uBAAuB;AAMnF,IAAa,0BAA6C,CAAC,uBAAuB;AAKlF,IAAM,sBAAyC;CAC3C;CACA;CACA;CACA;AACH;AAED,IAAM,6BAA+D;CACjE,YAAY;CACZ,QAAQ;CACR,sBAAsB;CACtB,GAAG;CACH,cAAc;CACd,eAAe;CACf,cAAc;CACd,YAAY;AACf;AAED,SAAS,iBAAkB,WAAkC;CACzD,OAAO,OAAO,OAAO,SAAS,CAAC,CAAC,SAAQ,UAAQ;EAC5C,IAAI,OAAO,UAAU,YAAY,UAAU,MACvC,OAAO,CAAA;EAGX,MAAM,UAAU,OAAO,QAAQ,KAAgC;EAG/D,OAFqB,QAAQ,SAAS,KAAK,QAAQ,OAAO,GAAG,cAAc,aAAa,KAAK,IAEvE,QAAQ,KAAK,CAAC,UAAU,IAAI,IAAI,CAAA;CAC1D,CAAC;AACL;AAEA,SAAS,cACL,WACA,SAAiC;CAEjC,OAAO,OAAO,YAAY,OAAO,QAAQ,SAAS,CAAC,CAAC,QAAQ,CAAC,SAAS,QAAQ,GAAG,CAAC,CAAC;AACvF;AAEA,IAAM,oBAAoB;AAC1B,IAAM,iBAAiB;AACvB,IAAM,mBAAmB,IAAI,IAAI,iBAAiB,cAAc,CAAC;AAIjE,IAAM,gCAAgB,IAAI,IAAI;CAC1B,GAAG,iBAAiB,cAAc,oBAAmB,QAAO,IAAI,SAAS,gBAAgB,CAAC,CAAC;CAC3F,GAAG,iBAAiB,cAAc,iBAAgB,QAAO,IAAI,SAAS,gBAAgB,CAAC,CAAC;CACxF,GAAG,iBAAiB,cAAc,oBAAmB,QAAO,IAAI,WAAW,SAAS,CAAC,CAAC;CACtF,GAAG;CACH,GAAG;AACN,CAAA;;;;;;;AAQD,SAAgB,qBAAkB;CAC9B,MAAM,GAAG,cAAc,aAAa,QAAQ;CAC5C,MAAM,UAAU,YAAY,QAAQ,OAAO,KAAK,WAAW,KAAK,IAAI,CAAA;CAEpE,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,SAAS,GAAG,mBAAmB,CAAC,CAAC;AAC5D;AAEA,IAAM,iBAAiB,IAAI,IAAI,mBAAkB,CAAE;AAEnD,SAAS,2BAA4B,gBAAsB;CACvD,OAAO,eAAe,WAAW,oBAAoB,IAC/C,GAAG,uBAAuB,eAAe,MAAM,CAA2B,MAC1E;AACV;;;;;;;;AASA,SAAgB,cAAe,gBAAsB;CACjD,MAAM,aAAa,2BAA2B,cAAc;CAE5D,OAAO,iBAAiB,IAAI,UAAU,KAAK,CAAC,cAAc,IAAI,UAAU;AAC5E;;;;;;;AAQA,SAAgB,gBAAiB,gBAAsB;CACnD,OAAO,eAAe,IAAI,2BAA2B,cAAc,CAAC;AACxE;;;;;;;;AASA,SAAgB,iBAAkB,gBAAsB;CACpD,IAAI,CAAC,eAAe,SAAS,GAAG,GAC5B,OAAO,UAAU;CAGrB,IAAI,eAAe,WAAW,wBAAwB,GAClD,OAAO,GAAG,2BAA2B,eAAe,MAAM,EAA+B;CAG7F,OAAO,2BAA2B,cAAc;AACpD;;;;;;;AAQA,SAAgB,mBAAoB,gBAAsB;CACtD,IAAI,CAAC,eAAe,SAAS,GAAG,GAC5B,OAAO;CAGX,MAAM,SAAS,eAAe,MAAM,GAAG,eAAe,YAAY,GAAG,CAAC;CAEtE,OAAO,2BAA2B,WAAW;AACjD;AAEA,SAAgB,eAAgB,OAAmC;CAC/D,IAAI,UAAU,KAAA,GACV,OAAO;CAGX,MAAM,CAAC,YAAY,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CAExD,OAAO,aAAa,SAAS,aAAa;AAC9C"}
|