@citrus-linting/eslint-config 1.3.0 → 1.4.0

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 CHANGED
@@ -16,7 +16,7 @@ ESLint config used by [CitRUS](https://github.com/CitRUSprod).
16
16
  Install dependencies:
17
17
 
18
18
  ```sh
19
- npm add -D globals @stylistic/eslint-plugin eslint-plugin-import @citrus-linting/eslint-config
19
+ npm add -D globals @stylistic/eslint-plugin eslint-plugin-import-x @citrus-linting/eslint-config
20
20
  ```
21
21
 
22
22
  Add `extends` field to your ESLint config (eslint.config.js):
@@ -51,7 +51,7 @@ export default [
51
51
  Install dependencies:
52
52
 
53
53
  ```sh
54
- npm add -D globals typescript-eslint @stylistic/eslint-plugin eslint-plugin-import @citrus-linting/eslint-config
54
+ npm add -D globals typescript-eslint @stylistic/eslint-plugin eslint-plugin-import-x @citrus-linting/eslint-config
55
55
  ```
56
56
 
57
57
  Add `extends` field to your ESLint config (eslint.config.js):
@@ -90,7 +90,7 @@ export default [
90
90
  Install dependencies:
91
91
 
92
92
  ```sh
93
- npm add -D globals svelte-eslint-parser eslint-plugin-svelte @stylistic/eslint-plugin eslint-plugin-import @citrus-linting/eslint-config
93
+ npm add -D globals svelte-eslint-parser eslint-plugin-svelte @stylistic/eslint-plugin eslint-plugin-import-x @citrus-linting/eslint-config
94
94
  ```
95
95
 
96
96
  Add `extends` field to your ESLint config (eslint.config.js):
@@ -129,7 +129,7 @@ export default [
129
129
  Install dependencies:
130
130
 
131
131
  ```sh
132
- npm add -D globals svelte-eslint-parser eslint-plugin-svelte typescript-eslint @stylistic/eslint-plugin eslint-plugin-import @citrus-linting/eslint-config
132
+ npm add -D globals svelte-eslint-parser eslint-plugin-svelte typescript-eslint @stylistic/eslint-plugin eslint-plugin-import-x @citrus-linting/eslint-config
133
133
  ```
134
134
 
135
135
  Add `extends` field to your ESLint config (eslint.config.js):
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import globals from "globals"
2
2
  import stylistic from "@stylistic/eslint-plugin"
3
- import importPlugin from "eslint-plugin-import"
3
+ import importPlugin from "eslint-plugin-import-x"
4
4
 
5
5
  import baseRules from "./rules/base.js"
6
6
 
7
7
  export default [
8
8
  {
9
9
  languageOptions: {
10
- ecmaVersion: 2024,
10
+ ecmaVersion: "latest",
11
11
  sourceType: "module",
12
12
  globals: {
13
13
  ...globals.browser,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citrus-linting/eslint-config",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "ESLint config used by CitRUS.",
5
5
  "keywords": [
6
6
  "config",
@@ -60,9 +60,17 @@ export default {
60
60
  leadingUnderscore: "require"
61
61
  },
62
62
  { selector: ["enumMember", "typeLike"], format: ["PascalCase"] },
63
- { selector: "import", modifiers: ["default"], format: ["camelCase", "PascalCase"] },
63
+ {
64
+ selector: "import",
65
+ modifiers: ["default"],
66
+ format: ["camelCase", "PascalCase"]
67
+ },
64
68
  { selector: ["objectLiteralProperty", "typeProperty"], format: null },
65
- { selector: "import", filter: { regex: "^_$", match: true }, format: null }
69
+ {
70
+ selector: "import",
71
+ filter: { regex: "^_$", match: true },
72
+ format: null
73
+ }
66
74
  ],
67
75
  "no-array-constructor": 0,
68
76
  "@typescript-eslint/no-array-constructor": 2,
@@ -1,10 +1,10 @@
1
- import typescriptEslint from "typescript-eslint";
2
- import svelteParser from "svelte-eslint-parser";
3
- import svelte from "eslint-plugin-svelte";
1
+ import typescriptEslint from "typescript-eslint"
2
+ import svelteParser from "svelte-eslint-parser"
3
+ import svelte from "eslint-plugin-svelte"
4
4
 
5
- import baseRules from "./rules/base.js";
6
- import typescriptRules from "./rules/typescript.js";
7
- import svelteRules from "./rules/svelte.js";
5
+ import baseRules from "./rules/base.js"
6
+ import typescriptRules from "./rules/typescript.js"
7
+ import svelteRules from "./rules/svelte.js"
8
8
 
9
9
  export default [
10
10
  {
@@ -15,19 +15,19 @@ export default [
15
15
  parserOptions: {
16
16
  parser: typescriptEslint.parser,
17
17
  project: "./tsconfig.eslint.json",
18
- extraFileExtensions: [".svelte"],
19
- },
18
+ extraFileExtensions: [".svelte"]
19
+ }
20
20
  },
21
21
  settings: {
22
22
  "import/parsers": {
23
23
  "@typescript-eslint/parser": [".ts", ".tsx", ".cts", ".mts"],
24
- espree: [".js", ".jsx", ".cjs", ".mjs"],
25
- },
24
+ espree: [".js", ".jsx", ".cjs", ".mjs"]
25
+ }
26
26
  },
27
27
  rules: {
28
28
  ...baseRules,
29
29
  ...typescriptRules,
30
- ...svelteRules,
31
- },
32
- },
33
- ];
30
+ ...svelteRules
31
+ }
32
+ }
33
+ ]
package/svelte.js CHANGED
@@ -1,24 +1,24 @@
1
- import svelteParser from "svelte-eslint-parser";
2
- import svelte from "eslint-plugin-svelte";
1
+ import svelteParser from "svelte-eslint-parser"
2
+ import svelte from "eslint-plugin-svelte"
3
3
 
4
- import baseRules from "./rules/base.js";
5
- import svelteRules from "./rules/svelte.js";
4
+ import baseRules from "./rules/base.js"
5
+ import svelteRules from "./rules/svelte.js"
6
6
 
7
7
  export default [
8
8
  {
9
9
  files: ["**/*.svelte", "**/*.svelte.js"],
10
10
  plugins: { svelte },
11
11
  languageOptions: {
12
- parser: svelteParser,
12
+ parser: svelteParser
13
13
  },
14
14
  settings: {
15
15
  "import/parsers": {
16
- espree: [".js", ".jsx", ".cjs", ".mjs"],
17
- },
16
+ espree: [".js", ".jsx", ".cjs", ".mjs"]
17
+ }
18
18
  },
19
19
  rules: {
20
20
  ...baseRules,
21
- ...svelteRules,
22
- },
23
- },
24
- ];
21
+ ...svelteRules
22
+ }
23
+ }
24
+ ]
package/typescript.js CHANGED
@@ -10,7 +10,7 @@ export default [
10
10
  languageOptions: {
11
11
  parser: typescriptEslint.parser,
12
12
  parserOptions: {
13
- project: ["./tsconfig.json", "./{apps,packages}/*/tsconfig.json"]
13
+ project: "./tsconfig.json"
14
14
  }
15
15
  },
16
16
  rules: {