@naturalcycles/dev-lib 20.21.0 → 20.22.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/cfg/_cnst.js +1 -1
- package/cfg/eslint.config.js +23 -27
- package/package.json +2 -5
package/cfg/_cnst.js
CHANGED
|
@@ -4,7 +4,7 @@ const prettierExtensionsExclusive = 'js,jsx,json,md,graphql,yml,yaml,html'
|
|
|
4
4
|
// everything that prettier supports:
|
|
5
5
|
const prettierExtensionsAll =
|
|
6
6
|
'ts,tsx,cts,mts,css,scss,js,jsx,cjs,mjs,json,md,graphql,yml,yaml,html,vue'
|
|
7
|
-
const eslintExtensions = 'ts,tsx,cts,mts,
|
|
7
|
+
const eslintExtensions = 'ts,tsx,cts,mts,html'
|
|
8
8
|
const stylelintExtensions = 'css,scss'
|
|
9
9
|
const lintExclude = ['./**/__exclude/**', './**/dist/**', './**/cache/**', './CHANGELOG.md']
|
|
10
10
|
const minActionlintVersion = '1.7.7'
|
package/cfg/eslint.config.js
CHANGED
|
@@ -7,14 +7,10 @@
|
|
|
7
7
|
import globals from 'globals'
|
|
8
8
|
import eslint from '@eslint/js'
|
|
9
9
|
import tseslint from 'typescript-eslint'
|
|
10
|
-
import eslintPluginVue from 'eslint-plugin-vue'
|
|
11
10
|
import eslintPluginOxlint from 'eslint-plugin-oxlint'
|
|
12
|
-
import eslintPluginVitest from '@vitest/eslint-plugin'
|
|
13
11
|
import eslintPluginImportX from 'eslint-plugin-import-x'
|
|
14
12
|
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort'
|
|
15
13
|
import eslintRules from './eslint-rules.js'
|
|
16
|
-
import eslintVueRules from './eslint-vue-rules.js'
|
|
17
|
-
import eslintVitestRules from './eslint-vitest-rules.js'
|
|
18
14
|
import eslintPrettierRules from './eslint-prettier-rules.js'
|
|
19
15
|
import eslintBiomeRules from './eslint-biome-rules.js'
|
|
20
16
|
|
|
@@ -23,7 +19,7 @@ const srcFiles = ['src/**/*.ts', 'src/**/*.tsx', 'src/**/*.cts', 'src/**/*.mts']
|
|
|
23
19
|
const scriptsFiles = ['scripts/**/*.ts', 'scripts/**/*.tsx', 'scripts/**/*.cts', 'scripts/**/*.mts']
|
|
24
20
|
const e2eFiles = ['e2e/**/*.ts', 'e2e/**/*.tsx', 'e2e/**/*.cts', 'e2e/**/*.mts']
|
|
25
21
|
const allFiles = [...srcFiles, ...scriptsFiles, ...e2eFiles]
|
|
26
|
-
const testFiles = ['**/*.test.ts', '**/*.test.tsx', '**/*.test.cts', '**/*.test.mts']
|
|
22
|
+
// const testFiles = ['**/*.test.ts', '**/*.test.tsx', '**/*.test.cts', '**/*.test.mts']
|
|
27
23
|
|
|
28
24
|
// const cwd = process.cwd()
|
|
29
25
|
// const tsconfigSrcPath = `${cwd}/tsconfig.json`
|
|
@@ -54,25 +50,25 @@ function getEslintConfigForDir() {
|
|
|
54
50
|
files: defaultFiles,
|
|
55
51
|
})),
|
|
56
52
|
// https://eslint.vuejs.org/user-guide/#user-guide
|
|
57
|
-
...eslintPluginVue.configs['flat/recommended'].map(c => ({
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})),
|
|
61
|
-
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
},
|
|
53
|
+
// ...eslintPluginVue.configs['flat/recommended'].map(c => ({
|
|
54
|
+
// ...c,
|
|
55
|
+
// files: defaultFiles,
|
|
56
|
+
// })),
|
|
57
|
+
// {
|
|
58
|
+
// files: testFiles,
|
|
59
|
+
// plugins: {
|
|
60
|
+
// vitest: eslintPluginVitest,
|
|
61
|
+
// },
|
|
62
|
+
// settings: {
|
|
63
|
+
// vitest: {
|
|
64
|
+
// typecheck: true,
|
|
65
|
+
// },
|
|
66
|
+
// },
|
|
67
|
+
// rules: {
|
|
68
|
+
// ...eslintPluginVitest.configs.recommended.rules,
|
|
69
|
+
// ...eslintVitestRules.rules,
|
|
70
|
+
// },
|
|
71
|
+
// },
|
|
76
72
|
{
|
|
77
73
|
files: allFiles,
|
|
78
74
|
...getConfig(),
|
|
@@ -110,7 +106,7 @@ function getConfig(_tsconfigPath) {
|
|
|
110
106
|
globals: {
|
|
111
107
|
...globals.browser,
|
|
112
108
|
...globals.node,
|
|
113
|
-
...globals.vitest,
|
|
109
|
+
// ...globals.vitest,
|
|
114
110
|
NodeJS: 'readonly',
|
|
115
111
|
},
|
|
116
112
|
parserOptions: {
|
|
@@ -118,7 +114,7 @@ function getConfig(_tsconfigPath) {
|
|
|
118
114
|
projectService: true,
|
|
119
115
|
// tsconfigRootDir: cwd,
|
|
120
116
|
parser: tseslint.parser,
|
|
121
|
-
extraFileExtensions: ['.
|
|
117
|
+
extraFileExtensions: ['.html'],
|
|
122
118
|
},
|
|
123
119
|
},
|
|
124
120
|
linterOptions: {
|
|
@@ -126,7 +122,7 @@ function getConfig(_tsconfigPath) {
|
|
|
126
122
|
},
|
|
127
123
|
rules: {
|
|
128
124
|
...eslintRules.rules,
|
|
129
|
-
...eslintVueRules.rules,
|
|
125
|
+
// ...eslintVueRules.rules,
|
|
130
126
|
...eslintPrettierRules.rules, // disable eslint rules already covered by prettier
|
|
131
127
|
...eslintBiomeRules.rules, // disable eslint rules already covered by biome
|
|
132
128
|
...eslintPluginOxlint.configs['flat/all'][0].rules, // disable eslint rules already covered by oxlint
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.22.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@biomejs/biome": "^2",
|
|
7
7
|
"@eslint/js": "^9",
|
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
"@naturalcycles/js-lib": "^15",
|
|
10
10
|
"@naturalcycles/nodejs-lib": "^15",
|
|
11
11
|
"@vitest/coverage-v8": "^4",
|
|
12
|
-
"@vitest/eslint-plugin": "^1",
|
|
13
12
|
"eslint": "^9",
|
|
14
13
|
"eslint-plugin-import-x": "^4",
|
|
15
14
|
"eslint-plugin-oxlint": "^1",
|
|
16
15
|
"eslint-plugin-simple-import-sort": "^12",
|
|
17
|
-
"eslint-plugin-vue": "^10",
|
|
18
16
|
"globals": "^17",
|
|
19
17
|
"lint-staged": "^16",
|
|
20
18
|
"micromatch": "^4",
|
|
@@ -22,8 +20,7 @@
|
|
|
22
20
|
"oxlint": "^1",
|
|
23
21
|
"oxlint-tsgolint": "*",
|
|
24
22
|
"prettier": "^3",
|
|
25
|
-
"typescript-eslint": "^8"
|
|
26
|
-
"vue-eslint-parser": "^10"
|
|
23
|
+
"typescript-eslint": "^8"
|
|
27
24
|
},
|
|
28
25
|
"peerDependencies": {
|
|
29
26
|
"husky": "^9",
|