@moso/eslint-config 3.0.0 → 3.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/README.md +9 -3
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +50 -62
- package/package.json +17 -17
package/README.md
CHANGED
|
@@ -9,13 +9,13 @@ Flat ESLint config for JavaScript, TypeScript, Vue, React, and more.
|
|
|
9
9
|
- [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new) with reasonable but opinionated defaults
|
|
10
10
|
- [Stylistic](https://eslint.style) with single quotes, semi enabled, sorted imports, and dangling commas
|
|
11
11
|
- Aimed to be used without Prettier
|
|
12
|
-
- Designed to work with JSX, TypeScript, Vue, React, Astro, and Next.js out of the box
|
|
12
|
+
- Designed to work with JSX, TypeScript, Vue, React, Astro, Nuxt, and Next.js out of the box
|
|
13
13
|
- Applies [Functional](https://github.com/eslint-functional/eslint-plugin-functional), [Perfectionist](https://perfectionist.dev), and [e18e](https://github.com/e18e/eslint-plugin) by default
|
|
14
14
|
- Lints for JSDoc, JSON, RegEx, TOML, and YAML
|
|
15
|
-
- Ships its own small [`@moso`
|
|
15
|
+
- Ships its own small [`@moso`](#custom-rules)-ruleset with security and hygiene rules
|
|
16
16
|
- Every config can be enabled/disabled
|
|
17
17
|
- Respects `.gitignore` by default
|
|
18
|
-
- Requires
|
|
18
|
+
- Requires Node.js >= v22.23.x/v24.18.x, ESLint v10+
|
|
19
19
|
|
|
20
20
|
> [!NOTE]
|
|
21
21
|
> **Note regarding TypeScript v7**
|
|
@@ -779,6 +779,12 @@ bunx simple-git-hooks
|
|
|
779
779
|
|
|
780
780
|
## FAQ
|
|
781
781
|
|
|
782
|
+
### ESLint v9, older Node.js versions?
|
|
783
|
+
|
|
784
|
+
ESLint v9 will reach [EOL on August 6th, 2026](https://eslint.org/version-support). The world of development moves fast, and as with Vue v2.x, I don't intend to support versions that has reached EOL unless absolutely necessary. The same goes with older Node.js versions.
|
|
785
|
+
|
|
786
|
+
Even though ESLint v10 supports Node.js `v20.19.0` (as of current status), this version has also reached EOL. The rest of their requirements mention `v22.13.0` and `>= 24`. However, the minimum requirements of some of the configs that this sharable config apply rules from have a minimum requirement of `v22.22.3`, this project will stay within this range.
|
|
787
|
+
|
|
782
788
|
### TypeScript 7?
|
|
783
789
|
|
|
784
790
|
TypeScript 7.0 [does not ship a compiler API](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/) (a new one supposedly arrives in 7.1), so [`typescript-eslint`](https://typescript-eslint.io) - and therefore all TypeScript linting in this config - cannot run against it. TypeScript's supported setup is running TypeScript 6 side-by-side through the [`@typescript/typescript6`](https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/#running-side-by-side-with-typescript-6.0) compatibility package, aliased so tooling that imports `typescript` keeps working:
|
package/dist/index.d.mts
CHANGED
|
@@ -2350,6 +2350,7 @@ interface RuleOptions {
|
|
|
2350
2350
|
/**
|
|
2351
2351
|
* disallow omitted end tags
|
|
2352
2352
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
2353
|
+
* @deprecated
|
|
2353
2354
|
*/
|
|
2354
2355
|
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
2355
2356
|
/**
|
|
@@ -2410,6 +2411,7 @@ interface RuleOptions {
|
|
|
2410
2411
|
/**
|
|
2411
2412
|
* disallow warnings when compiling.
|
|
2412
2413
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
2414
|
+
* @deprecated
|
|
2413
2415
|
*/
|
|
2414
2416
|
'astro/valid-compile'?: Linter.RuleEntry<[]>;
|
|
2415
2417
|
/**
|
|
@@ -16137,6 +16139,7 @@ type VitestPreferExpectAssertions = [] | [{
|
|
|
16137
16139
|
onlyFunctionsWithAsyncKeyword?: boolean;
|
|
16138
16140
|
onlyFunctionsWithExpectInLoop?: boolean;
|
|
16139
16141
|
onlyFunctionsWithExpectInCallback?: boolean;
|
|
16142
|
+
disallowHasAssertions?: boolean;
|
|
16140
16143
|
}];
|
|
16141
16144
|
// ----- vitest/prefer-import-in-mock -----
|
|
16142
16145
|
type VitestPreferImportInMock = [] | [{
|
|
@@ -17745,7 +17748,7 @@ type YmlSpacedComment = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
17745
17748
|
markers?: string[];
|
|
17746
17749
|
}];
|
|
17747
17750
|
// Names of all the configs
|
|
17748
|
-
type ConfigNames = 'moso/eslint-comments' | 'moso/ignores/globals' | 'moso/ignores/gitignore' | 'moso/imports' | 'moso/imports/typescript' | 'moso/javascript' | 'moso/javascript/opinionated' | 'moso/node' | 'moso/promise' | 'moso/regexp' | 'moso/unicorn' | 'moso/astro/setup' | 'moso/astro/rules' | 'moso/e18e/rules' | 'moso/e18e/library-disables' | 'moso/functional' | 'moso/jsdoc' | 'moso/jsonc' | 'moso/sort/package-json' | 'moso/sort/tsconfig-json' | 'moso/jsx/setup' | 'moso/jsx/rules' | 'moso/jsx/a11y' | 'moso/nextjs/setup' | 'moso/nextjs/rules' | 'moso/perfectionist' | 'moso/react' | 'moso/react/typescript' | 'moso/react/typescript/type-aware-rules' | 'moso/
|
|
17751
|
+
type ConfigNames = 'moso/eslint-comments' | 'moso/ignores/globals' | 'moso/ignores/gitignore' | 'moso/imports' | 'moso/imports/typescript' | 'moso/javascript' | 'moso/javascript/opinionated' | 'moso/node' | 'moso/promise' | 'moso/regexp' | 'moso/unicorn' | 'moso/stylistic' | 'moso/astro/setup' | 'moso/astro/rules' | 'moso/e18e/rules' | 'moso/e18e/library-disables' | 'moso/functional' | 'moso/jsdoc' | 'moso/jsonc' | 'moso/sort/package-json' | 'moso/sort/tsconfig-json' | 'moso/jsx/setup' | 'moso/jsx/rules' | 'moso/jsx/a11y' | 'moso/nextjs/setup' | 'moso/nextjs/rules' | 'moso/perfectionist' | 'moso/react' | 'moso/react/typescript' | 'moso/react/typescript/type-aware-rules' | 'moso/test/setup' | 'moso/test/rules' | 'moso/toml/setup' | 'moso/toml/rules' | 'moso/typescript/setup' | 'moso/typescript/rules' | 'moso/typescript/erasable-syntax' | 'moso/typescript/rules-type-aware' | 'moso/typescript/dts-overrides' | 'moso/typescript/test-overrides' | 'moso/typescript/javascript-overrides' | 'moso/vue/setup' | 'moso/vue/rules' | 'moso/vue/rules-type-aware' | 'moso/vue/a11y' | 'moso/yaml/setup' | 'moso/yaml/rules' | 'moso/disables/bin' | 'moso/disables/cjs' | 'moso/disables/cli' | 'moso/disables/config-files' | 'moso/disables/dts' | 'moso/disables/scripts' | 'moso/disables/typings';
|
|
17749
17752
|
//#endregion
|
|
17750
17753
|
//#region src/types.d.ts
|
|
17751
17754
|
type Awaitable<T> = Promise<T> | T;
|
package/dist/index.mjs
CHANGED
|
@@ -369,7 +369,8 @@ const GLOB_EXCLUDE = [
|
|
|
369
369
|
"**/components.ts",
|
|
370
370
|
"**/components.d.ts",
|
|
371
371
|
"**/typegen.ts",
|
|
372
|
-
"**/typegen.d.ts"
|
|
372
|
+
"**/typegen.d.ts",
|
|
373
|
+
"**/*.css.ts"
|
|
373
374
|
];
|
|
374
375
|
//#endregion
|
|
375
376
|
//#region src/configs/disables.ts
|
|
@@ -682,8 +683,8 @@ const ignores = async (options) => {
|
|
|
682
683
|
var package_default = {
|
|
683
684
|
name: "@moso/eslint-config",
|
|
684
685
|
type: "module",
|
|
685
|
-
version: "3.0.
|
|
686
|
-
description: "
|
|
686
|
+
version: "3.0.1",
|
|
687
|
+
description: "@moso's sharable ESLint config",
|
|
687
688
|
author: {
|
|
688
689
|
"name": "Morten Sørensen",
|
|
689
690
|
"email": "morten@moso.dev",
|
|
@@ -720,7 +721,7 @@ var package_default = {
|
|
|
720
721
|
"./package.json",
|
|
721
722
|
"dist/"
|
|
722
723
|
],
|
|
723
|
-
engines: { "node": "^22.
|
|
724
|
+
engines: { "node": "^22.22.3 || >=24" },
|
|
724
725
|
scripts: {
|
|
725
726
|
"build": "bun run typegen && tsdown --clean --dts",
|
|
726
727
|
"build:inspector": "bun run build && bunx @eslint/config-inspector build --config eslint.config.ts --out-dir ./.eslint-config-inspector",
|
|
@@ -728,7 +729,7 @@ var package_default = {
|
|
|
728
729
|
"lint": "eslint",
|
|
729
730
|
"prepack": "bun run build",
|
|
730
731
|
"prepare": "bun run simple-git-hooks",
|
|
731
|
-
"release": "bumpp && bun publish",
|
|
732
|
+
"release": "bumpp --recursive && bun publish",
|
|
732
733
|
"test": "vitest run",
|
|
733
734
|
"test:update-snapshots": "vitest --update",
|
|
734
735
|
"typecheck": "tsc --noEmit",
|
|
@@ -737,11 +738,11 @@ var package_default = {
|
|
|
737
738
|
},
|
|
738
739
|
workspaces: ["src/rules"],
|
|
739
740
|
peerDependencies: {
|
|
740
|
-
"@eslint-react/eslint-plugin": "^5.14.
|
|
741
|
+
"@eslint-react/eslint-plugin": "^5.14.7",
|
|
741
742
|
"@next/eslint-plugin-next": "^16.2.10",
|
|
742
|
-
"astro-eslint-parser": "^
|
|
743
|
-
"eslint": "
|
|
744
|
-
"eslint-plugin-astro": "^
|
|
743
|
+
"astro-eslint-parser": "^3.0.0",
|
|
744
|
+
"eslint": "^10.0.0",
|
|
745
|
+
"eslint-plugin-astro": "^3.0.0",
|
|
745
746
|
"eslint-plugin-erasable-syntax-only": "^0.4.2",
|
|
746
747
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
747
748
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -775,16 +776,16 @@ var package_default = {
|
|
|
775
776
|
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
776
777
|
"@typescript-eslint/parser": "^8.63.0",
|
|
777
778
|
"@typescript-eslint/utils": "^8.63.0",
|
|
778
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
779
|
+
"@vitest/eslint-plugin": "^1.6.23",
|
|
779
780
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
780
781
|
"eslint-flat-config-utils": "^3.2.0",
|
|
781
782
|
"eslint-merge-processors": "^2.0.0",
|
|
782
|
-
"eslint-plugin-de-morgan": "^2.1.
|
|
783
|
+
"eslint-plugin-de-morgan": "^2.1.3",
|
|
783
784
|
"eslint-plugin-functional": "^10.0.0",
|
|
784
785
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
785
786
|
"eslint-plugin-jsdoc": "^63.0.13",
|
|
786
787
|
"eslint-plugin-jsonc": "^3.3.0",
|
|
787
|
-
"eslint-plugin-n": "^18.2.
|
|
788
|
+
"eslint-plugin-n": "^18.2.2",
|
|
788
789
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
789
790
|
"eslint-plugin-perfectionist": "^5.10.0",
|
|
790
791
|
"eslint-plugin-promise": "^7.3.0",
|
|
@@ -802,7 +803,7 @@ var package_default = {
|
|
|
802
803
|
"yaml-eslint-parser": "^2.1.0"
|
|
803
804
|
},
|
|
804
805
|
devDependencies: {
|
|
805
|
-
"@eslint-react/eslint-plugin": "^5.14.
|
|
806
|
+
"@eslint-react/eslint-plugin": "^5.14.7",
|
|
806
807
|
"@eslint/compat": "^2.1.0",
|
|
807
808
|
"@eslint/config-inspector": "^3.0.4",
|
|
808
809
|
"@moso/eslint-plugin": "workspace:*",
|
|
@@ -810,10 +811,10 @@ var package_default = {
|
|
|
810
811
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
811
812
|
"@types/node": "^26.1.1",
|
|
812
813
|
"@typescript-eslint/rule-tester": "^8.63.0",
|
|
813
|
-
"astro-eslint-parser": "^
|
|
814
|
+
"astro-eslint-parser": "^3.0.0",
|
|
814
815
|
"bumpp": "^11.1.0",
|
|
815
|
-
"eslint": "^10.
|
|
816
|
-
"eslint-plugin-astro": "^
|
|
816
|
+
"eslint": "^10.7.0",
|
|
817
|
+
"eslint-plugin-astro": "^3.0.0",
|
|
817
818
|
"eslint-plugin-erasable-syntax-only": "^0.4.2",
|
|
818
819
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
819
820
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -826,8 +827,8 @@ var package_default = {
|
|
|
826
827
|
"nano-staged": "^1.0.2",
|
|
827
828
|
"simple-git-hooks": "^2.13.1",
|
|
828
829
|
"ts-dedent": "^2.3.0",
|
|
829
|
-
"tsdown": "^0.22.
|
|
830
|
-
"tsx": "^4.23.
|
|
830
|
+
"tsdown": "^0.22.7",
|
|
831
|
+
"tsx": "^4.23.1",
|
|
831
832
|
"typescript": "^6.0.3",
|
|
832
833
|
"vitest": "^4.1.10"
|
|
833
834
|
},
|
|
@@ -1731,25 +1732,7 @@ const javascript = async (options) => {
|
|
|
1731
1732
|
"no-param-reassign": "error",
|
|
1732
1733
|
"no-proto": "error",
|
|
1733
1734
|
"no-redeclare": ["error", { builtinGlobals: true }],
|
|
1734
|
-
"no-restricted-globals":
|
|
1735
|
-
"error",
|
|
1736
|
-
{
|
|
1737
|
-
message: "Use local parameter instead.",
|
|
1738
|
-
name: "event"
|
|
1739
|
-
},
|
|
1740
|
-
{
|
|
1741
|
-
message: "Use `globalThis` instead.",
|
|
1742
|
-
name: "global"
|
|
1743
|
-
},
|
|
1744
|
-
{
|
|
1745
|
-
message: "Use `globalThis` instead.",
|
|
1746
|
-
name: "self"
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
message: "Use `globalThis` instead.",
|
|
1750
|
-
name: "window"
|
|
1751
|
-
}
|
|
1752
|
-
],
|
|
1735
|
+
"no-restricted-globals": "off",
|
|
1753
1736
|
"no-restricted-properties": [
|
|
1754
1737
|
"error",
|
|
1755
1738
|
{
|
|
@@ -2106,6 +2089,7 @@ const jsx = async (options) => {
|
|
|
2106
2089
|
},
|
|
2107
2090
|
{
|
|
2108
2091
|
name: "moso/jsx/rules",
|
|
2092
|
+
files,
|
|
2109
2093
|
rules: {
|
|
2110
2094
|
...stylistic !== false && {
|
|
2111
2095
|
"@stylistic/jsx-curly-spacing": ["error", {
|
|
@@ -2121,6 +2105,7 @@ const jsx = async (options) => {
|
|
|
2121
2105
|
},
|
|
2122
2106
|
...jsxA11yPlugin ? [{
|
|
2123
2107
|
name: "moso/jsx/a11y",
|
|
2108
|
+
files,
|
|
2124
2109
|
plugins: { "jsx-a11y": memoize(jsxA11yPlugin, "eslint-plugin-jsx-a11y") },
|
|
2125
2110
|
rules: {
|
|
2126
2111
|
...lessOpinionated ? { ...(assert.ok(!Array.isArray(jsxA11yPlugin.flatConfigs.recommended)), jsxA11yPlugin.flatConfigs.recommended.rules) } : {
|
|
@@ -2303,6 +2288,7 @@ const node = async (options = {}) => {
|
|
|
2303
2288
|
}]],
|
|
2304
2289
|
"node/no-restricted-require": options.typescript ? "off" : ["error", [...restricedImports]],
|
|
2305
2290
|
"node/no-sync": "error",
|
|
2291
|
+
"node/no-unsupported-features/node-builtins": "off",
|
|
2306
2292
|
"node/prefer-global/buffer": ["error", "never"],
|
|
2307
2293
|
"node/prefer-global/console": ["error", "always"],
|
|
2308
2294
|
"node/prefer-promises/dns": "error",
|
|
@@ -3039,8 +3025,8 @@ const StylisticConfigDefaults = {
|
|
|
3039
3025
|
};
|
|
3040
3026
|
const stylistic = async (options) => {
|
|
3041
3027
|
const { experimental, indent, jsx, lessOpinionated, quotes, overrides, semi, typescript } = {
|
|
3042
|
-
...
|
|
3043
|
-
...
|
|
3028
|
+
...StylisticConfigDefaults,
|
|
3029
|
+
...options
|
|
3044
3030
|
};
|
|
3045
3031
|
const [stylisticPlugin] = await loadPackages(["@stylistic/eslint-plugin"]);
|
|
3046
3032
|
const config = stylisticPlugin.configs.customize({
|
|
@@ -3058,11 +3044,21 @@ const stylistic = async (options) => {
|
|
|
3058
3044
|
rules: {
|
|
3059
3045
|
...config.rules,
|
|
3060
3046
|
...!lessOpinionated && {
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3047
|
+
...!experimental && {
|
|
3048
|
+
"@stylistic/array-element-newline": ["error", {
|
|
3049
|
+
consistent: true,
|
|
3050
|
+
minItems: 4,
|
|
3051
|
+
multiline: true
|
|
3052
|
+
}],
|
|
3053
|
+
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
3054
|
+
"@stylistic/function-paren-newline": ["error", "consistent"],
|
|
3055
|
+
"@stylistic/object-curly-newline": ["error", {
|
|
3056
|
+
consistent: true,
|
|
3057
|
+
minProperties: 4,
|
|
3058
|
+
multiline: true
|
|
3059
|
+
}],
|
|
3060
|
+
"@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }]
|
|
3061
|
+
},
|
|
3066
3062
|
"@stylistic/arrow-parens": ["error", "always"],
|
|
3067
3063
|
"@stylistic/block-spacing": ["error", "always"],
|
|
3068
3064
|
"@stylistic/brace-style": [
|
|
@@ -3087,8 +3083,6 @@ const stylistic = async (options) => {
|
|
|
3087
3083
|
"@stylistic/computed-property-spacing": "error",
|
|
3088
3084
|
"@stylistic/dot-location": ["error", "property"],
|
|
3089
3085
|
"@stylistic/eol-last": ["error", "always"],
|
|
3090
|
-
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
3091
|
-
"@stylistic/function-paren-newline": ["error", "consistent"],
|
|
3092
3086
|
"@stylistic/generator-star-spacing": ["error", "after"],
|
|
3093
3087
|
"@stylistic/indent": typescript ? "off" : [
|
|
3094
3088
|
"error",
|
|
@@ -3191,12 +3185,6 @@ const stylistic = async (options) => {
|
|
|
3191
3185
|
ignoreComments: true,
|
|
3192
3186
|
skipBlankLines: true
|
|
3193
3187
|
}],
|
|
3194
|
-
"@stylistic/object-curly-newline": ["error", {
|
|
3195
|
-
consistent: true,
|
|
3196
|
-
minProperties: 4,
|
|
3197
|
-
multiline: true
|
|
3198
|
-
}],
|
|
3199
|
-
"@stylistic/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
3200
3188
|
"@stylistic/one-var-declaration-per-line": ["error", "always"],
|
|
3201
3189
|
"@stylistic/operator-linebreak": [
|
|
3202
3190
|
"error",
|
|
@@ -4399,7 +4387,7 @@ async function moso(options, ...userConfigs) {
|
|
|
4399
4387
|
const typescriptVersion = (typescriptRequested === false ? void 0 : await getPackageInfo("typescript"))?.version;
|
|
4400
4388
|
const typescriptUnsupported = typescriptVersion !== void 0 && Number(typescriptVersion.split(".")[0]) >= 7;
|
|
4401
4389
|
if (typescriptUnsupported) {
|
|
4402
|
-
const message = `[@moso/eslint-config] TypeScript ${typescriptVersion} was detected, but TypeScript 7 does not ship a
|
|
4390
|
+
const message = `[@moso/eslint-config] TypeScript ${typescriptVersion} was detected, but TypeScript 7 does not ship a programmatic API, so @typescript-eslint (and therefore all TypeScript linting) cannot run against it.\n\n
|
|
4403
4391
|
Install the TypeScript 6 compatibility package side-by-side via an npm alias:\n\n
|
|
4404
4392
|
npm install -D typescript@npm:@typescript/typescript6\n\n
|
|
4405
4393
|
Optionally keep TypeScript 7's own tsc available as "@typescript/native": "npm:typescript@^7.0.2".\n
|
|
@@ -4421,11 +4409,11 @@ async function moso(options, ...userConfigs) {
|
|
|
4421
4409
|
const modeOptions = typeof options.mode === "string" ? options.mode : "none";
|
|
4422
4410
|
const perfectionistOptions = typeof options.perfectionist === "boolean" ? options.perfectionist : options.lessOpinionated !== true;
|
|
4423
4411
|
const projectRootOptions = typeof options.projectRoot === "string" ? checkFilePath(options.projectRoot) : typeof options.typescript === "object" && typeof options.typescript.projectRoot === "string" ? checkFilePath(options.typescript.projectRoot) : void 0;
|
|
4424
|
-
const stylisticOptions = options.stylistic === false ? false :
|
|
4412
|
+
const stylisticOptions = options.stylistic === false ? false : {
|
|
4425
4413
|
...StylisticConfigDefaults,
|
|
4426
4414
|
jsx: typeof jsxOptions === "boolean" ? jsxOptions : true,
|
|
4427
|
-
...options.stylistic
|
|
4428
|
-
}
|
|
4415
|
+
...typeof options.stylistic === "object" && options.stylistic
|
|
4416
|
+
};
|
|
4429
4417
|
const { filesTypeAware, ignoresTypeAware, parserOptions, useDefaultDefaultProject, ...typescriptSubOptions } = resolveSubOptions(options, "typescript");
|
|
4430
4418
|
const projectServiceUserConfig = {
|
|
4431
4419
|
defaultProject: "./tsconfig.json",
|
|
@@ -4499,6 +4487,12 @@ async function moso(options, ...userConfigs) {
|
|
|
4499
4487
|
overrides: getOverrides(options, "unicorn")
|
|
4500
4488
|
})
|
|
4501
4489
|
];
|
|
4490
|
+
if (stylisticOptions !== false) mut_configs.push(stylistic({
|
|
4491
|
+
...stylisticOptions,
|
|
4492
|
+
lessOpinionated: options.lessOpinionated,
|
|
4493
|
+
overrides: getOverrides(options, "stylistic"),
|
|
4494
|
+
typescript: hasTypeScript
|
|
4495
|
+
}));
|
|
4502
4496
|
if (astroOptions !== false) mut_configs.push(astro({
|
|
4503
4497
|
...typescriptConfigOptions,
|
|
4504
4498
|
files: [GLOB_ASTRO],
|
|
@@ -4572,12 +4566,6 @@ async function moso(options, ...userConfigs) {
|
|
|
4572
4566
|
typescript: hasTypeScript,
|
|
4573
4567
|
...resolveSubOptions(options, "react")
|
|
4574
4568
|
}));
|
|
4575
|
-
if (stylisticOptions !== false) mut_configs.push(stylistic({
|
|
4576
|
-
...stylisticOptions,
|
|
4577
|
-
lessOpinionated: options.lessOpinionated,
|
|
4578
|
-
overrides: getOverrides(options, "stylistic"),
|
|
4579
|
-
typescript: hasTypeScript
|
|
4580
|
-
}));
|
|
4581
4569
|
if (options.test !== false) mut_configs.push(test({
|
|
4582
4570
|
files: GLOB_TESTS,
|
|
4583
4571
|
isInEditor,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moso/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "3.0.1",
|
|
5
|
+
"description": "@moso's sharable ESLint config",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Morten Sørensen",
|
|
8
8
|
"email": "morten@moso.dev",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dist/"
|
|
43
43
|
],
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": "^22.
|
|
45
|
+
"node": "^22.22.3 || >=24"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "bun run typegen && tsdown --clean --dts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"lint": "eslint",
|
|
52
52
|
"prepack": "bun run build",
|
|
53
53
|
"prepare": "bun run simple-git-hooks",
|
|
54
|
-
"release": "bumpp && bun publish",
|
|
54
|
+
"release": "bumpp --recursive && bun publish",
|
|
55
55
|
"test": "vitest run",
|
|
56
56
|
"test:update-snapshots": "vitest --update",
|
|
57
57
|
"typecheck": "tsc --noEmit",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"src/rules"
|
|
63
63
|
],
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@eslint-react/eslint-plugin": "^5.14.
|
|
65
|
+
"@eslint-react/eslint-plugin": "^5.14.7",
|
|
66
66
|
"@next/eslint-plugin-next": "^16.2.10",
|
|
67
|
-
"astro-eslint-parser": "^
|
|
68
|
-
"eslint": "
|
|
69
|
-
"eslint-plugin-astro": "^
|
|
67
|
+
"astro-eslint-parser": "^3.0.0",
|
|
68
|
+
"eslint": "^10.0.0",
|
|
69
|
+
"eslint-plugin-astro": "^3.0.0",
|
|
70
70
|
"eslint-plugin-erasable-syntax-only": "^0.4.2",
|
|
71
71
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
72
72
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -124,16 +124,16 @@
|
|
|
124
124
|
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
125
125
|
"@typescript-eslint/parser": "^8.63.0",
|
|
126
126
|
"@typescript-eslint/utils": "^8.63.0",
|
|
127
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
127
|
+
"@vitest/eslint-plugin": "^1.6.23",
|
|
128
128
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
129
129
|
"eslint-flat-config-utils": "^3.2.0",
|
|
130
130
|
"eslint-merge-processors": "^2.0.0",
|
|
131
|
-
"eslint-plugin-de-morgan": "^2.1.
|
|
131
|
+
"eslint-plugin-de-morgan": "^2.1.3",
|
|
132
132
|
"eslint-plugin-functional": "^10.0.0",
|
|
133
133
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
134
134
|
"eslint-plugin-jsdoc": "^63.0.13",
|
|
135
135
|
"eslint-plugin-jsonc": "^3.3.0",
|
|
136
|
-
"eslint-plugin-n": "^18.2.
|
|
136
|
+
"eslint-plugin-n": "^18.2.2",
|
|
137
137
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
138
138
|
"eslint-plugin-perfectionist": "^5.10.0",
|
|
139
139
|
"eslint-plugin-promise": "^7.3.0",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"yaml-eslint-parser": "^2.1.0"
|
|
152
152
|
},
|
|
153
153
|
"devDependencies": {
|
|
154
|
-
"@eslint-react/eslint-plugin": "^5.14.
|
|
154
|
+
"@eslint-react/eslint-plugin": "^5.14.7",
|
|
155
155
|
"@eslint/compat": "^2.1.0",
|
|
156
156
|
"@eslint/config-inspector": "^3.0.4",
|
|
157
157
|
"@moso/eslint-plugin": "3.0.0",
|
|
@@ -159,10 +159,10 @@
|
|
|
159
159
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
160
160
|
"@types/node": "^26.1.1",
|
|
161
161
|
"@typescript-eslint/rule-tester": "^8.63.0",
|
|
162
|
-
"astro-eslint-parser": "^
|
|
162
|
+
"astro-eslint-parser": "^3.0.0",
|
|
163
163
|
"bumpp": "^11.1.0",
|
|
164
|
-
"eslint": "^10.
|
|
165
|
-
"eslint-plugin-astro": "^
|
|
164
|
+
"eslint": "^10.7.0",
|
|
165
|
+
"eslint-plugin-astro": "^3.0.0",
|
|
166
166
|
"eslint-plugin-erasable-syntax-only": "^0.4.2",
|
|
167
167
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
168
168
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
"nano-staged": "^1.0.2",
|
|
176
176
|
"simple-git-hooks": "^2.13.1",
|
|
177
177
|
"ts-dedent": "^2.3.0",
|
|
178
|
-
"tsdown": "^0.22.
|
|
179
|
-
"tsx": "^4.23.
|
|
178
|
+
"tsdown": "^0.22.7",
|
|
179
|
+
"tsx": "^4.23.1",
|
|
180
180
|
"typescript": "^6.0.3",
|
|
181
181
|
"vitest": "^4.1.10"
|
|
182
182
|
},
|