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 CHANGED
@@ -4,7 +4,7 @@ Create project with likcheung habbits
4
4
 
5
5
  <a href="https://www.licuii.xyz">
6
6
  <img
7
- src="http://cdn.licuii.xyz/self/lic-icon.png"
7
+ src="http://cdn.licuii.fun/self/lic-icon.png"
8
8
  alt="lic-logo"
9
9
  width="50"
10
10
  />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lik-app",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "licheung228 <licheung228@163.com>",
@@ -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': 'error',
52
- '@typescript-eslint/no-explicit-any': 'error',
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': 'error',
52
- '@typescript-eslint/no-explicit-any': 'error',
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': 'error',
52
- '@typescript-eslint/no-explicit-any': 'error',
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': 'error',
52
- '@typescript-eslint/no-explicit-any': 'error',
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 js from '@eslint/js';
2
- import globals from 'globals';
3
- import reactHooks from 'eslint-plugin-react-hooks';
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 tseslint.config(
10
- { ignores: ['dist', 'node_modules'] },
5
+ export default [
11
6
  {
12
- extends: [js.configs.recommended, ...tseslint.configs.recommended],
13
- files: ['**/*.{ts,tsx}'],
14
- languageOptions: {
15
- ecmaVersion: 2020,
16
- globals: globals.browser
17
- },
18
- plugins: {
19
- prettier,
20
- 'react-hooks': reactHooks,
21
- 'react-refresh': reactRefresh
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/consistent-type-imports': 'error', // - 要求 import type
44
- '@typescript-eslint/no-use-before-define': [
45
- 'error',
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
+ ]