create-lik-app 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/package.json +1 -1
- package/templates/template-react/eslint.config.mjs +6 -5
- package/templates/template-react-tanstack-jotai/eslint.config.mjs +6 -5
- package/templates/template-react-tanstack-jotai-tailwindcss/eslint.config.mjs +6 -5
- package/templates/template-react18-tanstack-jotai-tailwindcss/eslint.config.mjs +6 -5
- package/templates/template-vue/eslint.config.js +31 -50
package/README.md
CHANGED
package/package.json
CHANGED
@@ -27,29 +27,30 @@ export default tseslint.config(
|
|
27
27
|
// '@typescript-eslint/no-non-null-assertion': 'error',
|
28
28
|
'no-unused-vars': [
|
29
29
|
'error',
|
30
|
-
// - 未使用的变量都以 _ 开头, 则忽略
|
31
30
|
{
|
32
31
|
argsIgnorePattern: '^_',
|
33
|
-
varsIgnorePattern: '^_'
|
32
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]|^[A-Z]'
|
34
33
|
}
|
35
34
|
],
|
36
35
|
'@typescript-eslint/no-unused-vars': [
|
37
36
|
'error',
|
38
37
|
{
|
39
38
|
argsIgnorePattern: '^_',
|
40
|
-
varsIgnorePattern: '^_'
|
39
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]'
|
41
40
|
}
|
42
41
|
],
|
43
42
|
'@typescript-eslint/consistent-type-imports': 'error', // - 要求 import type
|
44
43
|
'@typescript-eslint/no-use-before-define': [
|
45
44
|
'error',
|
46
45
|
{
|
46
|
+
enums: true,
|
47
|
+
typedefs: false,
|
47
48
|
functions: false
|
48
49
|
}
|
49
50
|
],
|
50
51
|
'@typescript-eslint/ban-ts-comment': 'error',
|
51
|
-
'@typescript-eslint/explicit-module-boundary-types': '
|
52
|
-
'@typescript-eslint/no-explicit-any': '
|
52
|
+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
|
53
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
53
54
|
'@typescript-eslint/no-var-requires': 'error',
|
54
55
|
'@typescript-eslint/no-empty-function': 'error',
|
55
56
|
...reactHooks.configs.recommended.rules,
|
@@ -27,29 +27,30 @@ export default tseslint.config(
|
|
27
27
|
// '@typescript-eslint/no-non-null-assertion': 'error',
|
28
28
|
'no-unused-vars': [
|
29
29
|
'error',
|
30
|
-
// - 未使用的变量都以 _ 开头, 则忽略
|
31
30
|
{
|
32
31
|
argsIgnorePattern: '^_',
|
33
|
-
varsIgnorePattern: '^_'
|
32
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]|^[A-Z]'
|
34
33
|
}
|
35
34
|
],
|
36
35
|
'@typescript-eslint/no-unused-vars': [
|
37
36
|
'error',
|
38
37
|
{
|
39
38
|
argsIgnorePattern: '^_',
|
40
|
-
varsIgnorePattern: '^_'
|
39
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]'
|
41
40
|
}
|
42
41
|
],
|
43
42
|
'@typescript-eslint/consistent-type-imports': 'error', // - 要求 import type
|
44
43
|
'@typescript-eslint/no-use-before-define': [
|
45
44
|
'error',
|
46
45
|
{
|
46
|
+
enums: true,
|
47
|
+
typedefs: false,
|
47
48
|
functions: false
|
48
49
|
}
|
49
50
|
],
|
50
51
|
'@typescript-eslint/ban-ts-comment': 'error',
|
51
|
-
'@typescript-eslint/explicit-module-boundary-types': '
|
52
|
-
'@typescript-eslint/no-explicit-any': '
|
52
|
+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
|
53
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
53
54
|
'@typescript-eslint/no-var-requires': 'error',
|
54
55
|
'@typescript-eslint/no-empty-function': 'error',
|
55
56
|
...reactHooks.configs.recommended.rules,
|
@@ -27,29 +27,30 @@ export default tseslint.config(
|
|
27
27
|
// '@typescript-eslint/no-non-null-assertion': 'error',
|
28
28
|
'no-unused-vars': [
|
29
29
|
'error',
|
30
|
-
// - 未使用的变量都以 _ 开头, 则忽略
|
31
30
|
{
|
32
31
|
argsIgnorePattern: '^_',
|
33
|
-
varsIgnorePattern: '^_'
|
32
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]|^[A-Z]'
|
34
33
|
}
|
35
34
|
],
|
36
35
|
'@typescript-eslint/no-unused-vars': [
|
37
36
|
'error',
|
38
37
|
{
|
39
38
|
argsIgnorePattern: '^_',
|
40
|
-
varsIgnorePattern: '^_'
|
39
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]'
|
41
40
|
}
|
42
41
|
],
|
43
42
|
'@typescript-eslint/consistent-type-imports': 'error', // - 要求 import type
|
44
43
|
'@typescript-eslint/no-use-before-define': [
|
45
44
|
'error',
|
46
45
|
{
|
46
|
+
enums: true,
|
47
|
+
typedefs: false,
|
47
48
|
functions: false
|
48
49
|
}
|
49
50
|
],
|
50
51
|
'@typescript-eslint/ban-ts-comment': 'error',
|
51
|
-
'@typescript-eslint/explicit-module-boundary-types': '
|
52
|
-
'@typescript-eslint/no-explicit-any': '
|
52
|
+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
|
53
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
53
54
|
'@typescript-eslint/no-var-requires': 'error',
|
54
55
|
'@typescript-eslint/no-empty-function': 'error',
|
55
56
|
...reactHooks.configs.recommended.rules,
|
@@ -27,29 +27,30 @@ export default tseslint.config(
|
|
27
27
|
// '@typescript-eslint/no-non-null-assertion': 'error',
|
28
28
|
'no-unused-vars': [
|
29
29
|
'error',
|
30
|
-
// - 未使用的变量都以 _ 开头, 则忽略
|
31
30
|
{
|
32
31
|
argsIgnorePattern: '^_',
|
33
|
-
varsIgnorePattern: '^_'
|
32
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]|^[A-Z]'
|
34
33
|
}
|
35
34
|
],
|
36
35
|
'@typescript-eslint/no-unused-vars': [
|
37
36
|
'error',
|
38
37
|
{
|
39
38
|
argsIgnorePattern: '^_',
|
40
|
-
varsIgnorePattern: '^_'
|
39
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]'
|
41
40
|
}
|
42
41
|
],
|
43
42
|
'@typescript-eslint/consistent-type-imports': 'error', // - 要求 import type
|
44
43
|
'@typescript-eslint/no-use-before-define': [
|
45
44
|
'error',
|
46
45
|
{
|
46
|
+
enums: true,
|
47
|
+
typedefs: false,
|
47
48
|
functions: false
|
48
49
|
}
|
49
50
|
],
|
50
51
|
'@typescript-eslint/ban-ts-comment': 'error',
|
51
|
-
'@typescript-eslint/explicit-module-boundary-types': '
|
52
|
-
'@typescript-eslint/no-explicit-any': '
|
52
|
+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
|
53
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
53
54
|
'@typescript-eslint/no-var-requires': 'error',
|
54
55
|
'@typescript-eslint/no-empty-function': 'error',
|
55
56
|
...reactHooks.configs.recommended.rules,
|
@@ -1,62 +1,43 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh';
|
5
|
-
import tseslint from 'typescript-eslint';
|
6
|
-
import prettier from 'eslint-plugin-prettier';
|
7
|
-
import prettierConfig from './prettier.config.mjs';
|
1
|
+
import pluginVue from 'eslint-plugin-vue'
|
2
|
+
import vueTsEslintConfig from '@vue/eslint-config-typescript'
|
3
|
+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
8
4
|
|
9
|
-
export default
|
10
|
-
{ ignores: ['dist', 'node_modules'] },
|
5
|
+
export default [
|
11
6
|
{
|
12
|
-
|
13
|
-
files: ['**/*.{ts,tsx}'],
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
7
|
+
name: 'lint',
|
8
|
+
files: ['**/*.{ts,mts,tsx,vue}'],
|
9
|
+
},
|
10
|
+
{
|
11
|
+
name: 'lint-ignore',
|
12
|
+
ignores: ['**/dist/**', 'node_modules', '**/dist-ssr/**', '**/coverage/**'],
|
13
|
+
},
|
14
|
+
{
|
15
|
+
name: 'lint-rules',
|
16
|
+
rules: {
|
17
|
+
'@typescript-eslint/consistent-type-imports': 'error', // 要求 import type
|
22
18
|
},
|
19
|
+
},
|
20
|
+
...pluginVue.configs['flat/essential'],
|
21
|
+
...vueTsEslintConfig(),
|
22
|
+
skipFormatting,
|
23
|
+
{
|
24
|
+
name: 'lik',
|
23
25
|
rules: {
|
24
|
-
'prettier/prettier': ['error', prettierConfig],
|
25
|
-
'no-useless-escape': 'error',
|
26
|
-
// 'no-undef': 'error', // - for unplugin-auto-import
|
27
|
-
// '@typescript-eslint/no-non-null-assertion': 'error',
|
28
26
|
'no-unused-vars': [
|
29
27
|
'error',
|
30
|
-
// - 未使用的变量都以 _ 开头, 则忽略
|
31
28
|
{
|
32
|
-
argsIgnorePattern: '^_',
|
33
|
-
varsIgnorePattern: '^_'
|
34
|
-
}
|
29
|
+
argsIgnorePattern: '^_|e',
|
30
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]|^[A-Z]',
|
31
|
+
},
|
35
32
|
],
|
36
33
|
'@typescript-eslint/no-unused-vars': [
|
37
34
|
'error',
|
38
35
|
{
|
39
|
-
argsIgnorePattern: '^_',
|
40
|
-
varsIgnorePattern: '^_'
|
41
|
-
}
|
36
|
+
argsIgnorePattern: '^_|e',
|
37
|
+
varsIgnorePattern: '^_|[\u4e00-\u9fa5]',
|
38
|
+
},
|
42
39
|
],
|
43
|
-
'@typescript-eslint/
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
functions: false
|
48
|
-
}
|
49
|
-
],
|
50
|
-
'@typescript-eslint/ban-ts-comment': 'error',
|
51
|
-
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
52
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
53
|
-
'@typescript-eslint/no-var-requires': 'error',
|
54
|
-
'@typescript-eslint/no-empty-function': 'error',
|
55
|
-
...reactHooks.configs.recommended.rules,
|
56
|
-
'react-refresh/only-export-components': [
|
57
|
-
'warn',
|
58
|
-
{ allowConstantExport: true }
|
59
|
-
]
|
60
|
-
}
|
61
|
-
}
|
62
|
-
);
|
40
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
41
|
+
},
|
42
|
+
},
|
43
|
+
]
|