eslint-config-tungsten-flat 0.3.1 → 0.3.3

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/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "eslint-config-tungsten-flat",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
7
- "dist"
7
+ "dist",
8
+ "src"
8
9
  ],
9
10
  "main": "dist/index.js",
10
11
  "keywords": [],
11
12
  "author": "",
12
13
  "license": "ISC",
13
14
  "dependencies": {
14
- "eslint-config-tungsten-base-flat": "^0.3.0",
15
- "typescript-eslint": "^8.57.1"
15
+ "eslint-config-tungsten-base-flat": "^0.3.2",
16
+ "typescript-eslint": "^8.69.0"
16
17
  },
17
18
  "peerDependencies": {
18
- "eslint": "^9.0.0 || ^10.0.0"
19
+ "eslint": "^9.0.0"
19
20
  },
20
21
  "__OldPeerDependencies": {
21
22
  "@babel/core": "^7.18.5",
@@ -25,8 +26,8 @@
25
26
  "eslint-plugin-import": "^2.26.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@types/node": "^22.19.15",
29
- "eslint": "^9.39.4",
29
+ "@types/node": "^22.20.1",
30
+ "eslint": "^9.39.5",
30
31
  "typescript": "^5.9.3"
31
32
  },
32
33
  "scripts": {
package/src/index.ts ADDED
@@ -0,0 +1,99 @@
1
+
2
+ import { defineConfig, globalIgnores, Config } from 'eslint/config'
3
+ //export type { CompatibleConfigArray } from 'typescript-eslint' // would use this instead of `as ConfigArray` if typescript-eslint exported this type
4
+ import tungstenBase from 'eslint-config-tungsten-base-flat'
5
+ import tseslint from 'typescript-eslint'
6
+
7
+ export default defineConfig([
8
+ {
9
+ extends: [tungstenBase]
10
+ },
11
+ //...tungstenJs,
12
+ ///...tseslint.configs.recommended,
13
+ tseslint.configs.recommendedTypeChecked as Config[],
14
+ {
15
+ languageOptions: {
16
+ parserOptions: {
17
+ //projectService: true,
18
+ projectService: {
19
+ allowDefaultProject: [
20
+ '*.config.js',
21
+ //'eslint.config.js',
22
+ //'tungsten.config.js',
23
+ //'sxy-test-runner.config.js'
24
+ ],
25
+ },
26
+ //tsconfigRootDir: import.meta.dirname,
27
+ },
28
+ },
29
+ },
30
+
31
+ //"plugin:@typescript-eslint/recommended",
32
+ //"plugin:import/typescript",
33
+ globalIgnores([".tungsten"]),
34
+ {
35
+ "rules": {
36
+ "prefer-const": "warn", // this is set in tungsten-base already, but for some reason gets reset to error
37
+
38
+ // //// style
39
+ // "no-trailing-spaces" : ["warn", {
40
+ // "skipBlankLines": true,
41
+ // "ignoreComments": true
42
+ // }],
43
+
44
+ // no import rules to disable - the base carries none, and this config
45
+ // deliberately does not take eslint-config-tungsten-js-flat
46
+
47
+ //"@typescript-eslint/ban-types": "warn", // removed
48
+
49
+ // which one to use? this had warn, but a project had it off
50
+ "@typescript-eslint/no-empty-object-type": "warn",
51
+ //"@typescript-eslint/no-empty-object-type": "off",
52
+
53
+ "@typescript-eslint/no-unsafe-function-type": "warn",
54
+ "@typescript-eslint/no-wrapper-object-types": "warn",
55
+
56
+ //"@typescript-eslint/no-empty-interface": "warn", // deprecated, superseded by no-empty-object-type above
57
+ "@typescript-eslint/no-empty-function": "off",
58
+ "@typescript-eslint/no-namespace": "warn",
59
+ "@typescript-eslint/no-unnecessary-type-assertion": "warn",
60
+ "@typescript-eslint/strict-boolean-expressions": "warn",
61
+ "@typescript-eslint/no-this-alias": "warn",
62
+ "@typescript-eslint/ban-ts-comment": "off",
63
+ "@typescript-eslint/no-inferrable-types": "off",
64
+ "@typescript-eslint/no-explicit-any": "off",
65
+ // would like to change to _unused or unused_, but conflicts with the camel case rule
66
+ //"@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^__*$|^unused$|^unused|.+unused$", "argsIgnorePattern": "^__*$|^unused$|^unused_.+|.+_unused$|^reject$" }],
67
+ // "^_" (any leading underscore) subsumes the older "^__*$" (which only matched a
68
+ // name that was entirely underscores), and covers the `_name` convention too
69
+ "@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^_|unused$", "argsIgnorePattern": "^_|unused$|^reject$" }],
70
+ "@typescript-eslint/switch-exhaustiveness-check": "warn",
71
+ "@typescript-eslint/require-await": "warn",
72
+ "@typescript-eslint/no-unsafe-member-access": "warn",
73
+ "@typescript-eslint/no-unsafe-call": "warn",
74
+ "@typescript-eslint/no-unused-expressions": "warn",
75
+
76
+ // added TS rules
77
+ '@typescript-eslint/no-misused-spread': 'warn',
78
+
79
+ // fires on every event handler and JSX prop taking an async function,
80
+ // which is the normal shape in a tungsten app
81
+ '@typescript-eslint/no-misused-promises': 'off',
82
+ '@typescript-eslint/no-for-in-array': 'off',
83
+ '@typescript-eslint/no-floating-promises': 'warn',
84
+
85
+ // these can give false positives due to eslint info being stale
86
+ '@typescript-eslint/no-unsafe-assignment': 'warn',
87
+
88
+ // replaces the old plugin-no-type-assertion rule: permits widening, flags narrowing
89
+ "@typescript-eslint/no-unsafe-type-assertion": "warn",
90
+
91
+ // was using this in a project, but doesn't seem to change the underlying config
92
+ //"react/no-unknown-property": ["warn", { ignore: ["for"] }]
93
+ "react/no-unknown-property": "off"
94
+ },
95
+ }
96
+
97
+ ])
98
+
99
+
@@ -0,0 +1,2 @@
1
+
2
+ declare module 'eslint-plugin-no-type-assertion'