eslint-config-tungsten-flat 0.3.14 → 0.3.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAA;;AAMnE,wBA8GE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,MAAM,EAAE,MAAM,eAAe,CAAA;;AAOnE,wBAyHE"}
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import { defineConfig, globalIgnores } from 'eslint/config';
2
2
  //export type { CompatibleConfigArray } from 'typescript-eslint' // would use this instead of `as ConfigArray` if typescript-eslint exported this type
3
3
  import tungstenBase from 'eslint-config-tungsten-base-flat';
4
4
  import importsRegulation from 'eslint-plugin-imports-regulation';
5
+ import noUselessNoUselessAssignment from 'eslint-plugin-no-useless-no-useless-assignment';
5
6
  import tseslint from 'typescript-eslint';
6
7
  export default defineConfig([
7
8
  {
@@ -95,8 +96,19 @@ export default defineConfig([
95
96
  blankLinesAfter: 2,
96
97
  // whether to convert imports with only type specifiers into a type declaration
97
98
  // import { type A, ... } from 'a' -> import type { A, ... } from 'a'
98
- preferTypeDeclarations: false
99
+ preferTypeDeclarations: true,
100
+ // the max and target length of import lines
101
+ maxLen: 100
99
102
  }]
100
103
  }
104
+ },
105
+ {
106
+ plugins: {
107
+ 'no-useless-no-useless-assignment': noUselessNoUselessAssignment
108
+ },
109
+ rules: {
110
+ // TS-aware fork of the core rule, which the base turns off
111
+ 'no-useless-no-useless-assignment/no-useless-assignment': 'warn'
112
+ }
101
113
  }
102
114
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-tungsten-flat",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -12,9 +12,10 @@
12
12
  "author": "",
13
13
  "license": "ISC",
14
14
  "dependencies": {
15
- "eslint-config-tungsten-base-flat": "^0.3.16",
16
- "eslint-plugin-imports-regulation": "^0.2.15",
17
- "typescript-eslint": "^8.70.0"
15
+ "eslint-config-tungsten-base-flat": "^0.3.17",
16
+ "eslint-plugin-imports-regulation": "^0.2.17",
17
+ "eslint-plugin-no-useless-no-useless-assignment": "^0.1.0",
18
+ "typescript-eslint": "^8.70.1"
18
19
  },
19
20
  "peerDependencies": {
20
21
  "eslint": "^9.0.0 || ^10.0.0"
@@ -27,7 +28,7 @@
27
28
  "eslint-plugin-import": "^2.26.0"
28
29
  },
29
30
  "devDependencies": {
30
- "@types/node": "^22.20.3",
31
+ "@types/node": "^22.20.4",
31
32
  "eslint": "^9.39.5",
32
33
  "typescript": "^5.9.3"
33
34
  },
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ import { defineConfig, globalIgnores, Config } from 'eslint/config'
3
3
  //export type { CompatibleConfigArray } from 'typescript-eslint' // would use this instead of `as ConfigArray` if typescript-eslint exported this type
4
4
  import tungstenBase from 'eslint-config-tungsten-base-flat'
5
5
  import importsRegulation from 'eslint-plugin-imports-regulation'
6
+ import noUselessNoUselessAssignment from 'eslint-plugin-no-useless-no-useless-assignment'
6
7
  import tseslint from 'typescript-eslint'
7
8
 
8
9
  export default defineConfig([
@@ -110,9 +111,20 @@ export default defineConfig([
110
111
  blankLinesAfter: 2,
111
112
  // whether to convert imports with only type specifiers into a type declaration
112
113
  // import { type A, ... } from 'a' -> import type { A, ... } from 'a'
113
- preferTypeDeclarations: false
114
+ preferTypeDeclarations: true,
115
+ // the max and target length of import lines
116
+ maxLen: 100
114
117
  }]
115
118
  }
119
+ },
120
+ {
121
+ plugins: {
122
+ 'no-useless-no-useless-assignment': noUselessNoUselessAssignment
123
+ },
124
+ rules: {
125
+ // TS-aware fork of the core rule, which the base turns off
126
+ 'no-useless-no-useless-assignment/no-useless-assignment': 'warn'
127
+ }
116
128
  }
117
129
 
118
130
  ])