@autobest-ui/scripts 1.8.2-alpha.0 → 1.8.2-alpha.2

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.
@@ -0,0 +1,62 @@
1
+ module.exports = {
2
+ env: {
3
+ browser: true,
4
+ node: true,
5
+ es6: true,
6
+ jest: true
7
+ },
8
+ parser: '@typescript-eslint/parser',
9
+ plugins: ['prettier', '@typescript-eslint'],
10
+ settings: {
11
+ react: {
12
+ version: 'detect'
13
+ }
14
+ },
15
+ parserOptions: {
16
+ project: './tsconfig.json',
17
+ createDefaultProgram: true,
18
+ ecmaVersion: 2018,
19
+ sourceType: 'module'
20
+ },
21
+ extends: [
22
+ 'prettier',
23
+ 'eslint:recommended',
24
+ 'plugin:react/recommended',
25
+ 'plugin:import/recommended',
26
+ 'plugin:@typescript-eslint/recommended',
27
+ 'plugin:import/typescript',
28
+ 'plugin:react-hooks/recommended'
29
+ ],
30
+ rules: {
31
+ 'prettier/prettier': [
32
+ 'error',
33
+ {
34
+ printWidth: 80,
35
+ tabWidth: 2,
36
+ singleQuote: true,
37
+ semi: true,
38
+ trailingComma: 'none',
39
+ bracketSpacing: true,
40
+ endOfLine: 'lf',
41
+ arrowParens: 'avoid'
42
+ }
43
+ ],
44
+ // 无意义的constructor
45
+ '@typescript-eslint/no-useless-constructor': 'error',
46
+ // 要求类成员之间有空行
47
+ '@typescript-eslint/lines-between-class-members': 'error',
48
+ // 可以使用require
49
+ '@typescript-eslint/no-var-requires': 0,
50
+ '@typescript-eslint/ban-ts-comment': 0,
51
+ '@typescript-eslint/no-explicit-any': 0,
52
+ // 空函数
53
+ '@typescript-eslint/no-empty-function': 0,
54
+ 'no-empty': 0,
55
+ 'no-irregular-whitespace': 0,
56
+ 'react/prop-types': 0,
57
+ 'react/no-unescaped-entities': 0,
58
+ // 导入顺序
59
+ 'import/order': 'error',
60
+ 'no-console': 'error'
61
+ }
62
+ };
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss', 'stylelint-config-css-modules'],
3
+ rules: {
4
+ 'declaration-no-important': true,
5
+ // 在开大括号之前必须有一个空格。
6
+ 'block-opening-brace-space-before': 'always',
7
+ 'alpha-value-notation': null,
8
+ 'scss/no-global-function-names': null,
9
+ 'no-descending-specificity': null,
10
+ // 为了兼容css module 小驼峰命名
11
+ 'selector-class-pattern': '(^([a-z][a-z0-9]*)(-[a-z0-9]+)*$)|(^[a-z][a-zA-Z0-9]+$)',
12
+ 'keyframes-name-pattern': '(^([a-z][_a-z0-9]*)(-[a-z0-9]+)*$)|(^([a-z][a-zA-Z0-9]+)*$)'
13
+ }
14
+ };
@@ -0,0 +1,32 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "allowJs": true,
5
+ "baseUrl": "./",
6
+ "outDir": "./dist/",
7
+ "strictNullChecks": false,
8
+ "moduleResolution": "node",
9
+ "esModuleInterop": true,
10
+ "experimentalDecorators": true,
11
+ "noUnusedParameters": true,
12
+ "strictPropertyInitialization": false,
13
+ "noUnusedLocals": true,
14
+ "noImplicitAny": false,
15
+ "sourceMap": true,
16
+ "jsx": "react",
17
+ "module": "esnext",
18
+ "target": "es5",
19
+ "lib": [
20
+ "es5",
21
+ "es6",
22
+ "es2015",
23
+ "es2016",
24
+ "es2017",
25
+ "es2018",
26
+ "dom"
27
+ ],
28
+ "skipLibCheck": true,
29
+ "allowSyntheticDefaultImports": true
30
+ },
31
+ "exclude": ["node_modules", "config", "build", "dist", "log"]
32
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobest-ui/scripts",
3
- "version": "1.8.2-alpha.0",
3
+ "version": "1.8.2-alpha.2",
4
4
  "private": false,
5
5
  "description": "utils for project tools",
6
6
  "bin": {
@@ -21,7 +21,8 @@
21
21
  "bin",
22
22
  "spaConfig",
23
23
  "ssrConfig",
24
- "common"
24
+ "common",
25
+ "check"
25
26
  ],
26
27
  "keywords": [
27
28
  "node",
@@ -63,6 +64,8 @@
63
64
  "@loadable/babel-plugin": "5.13.2",
64
65
  "@loadable/webpack-plugin": "5.15.2",
65
66
  "@soda/friendly-errors-webpack-plugin": "1.8.1",
67
+ "@typescript-eslint/eslint-plugin": "5.38.0",
68
+ "@typescript-eslint/parser": "5.38.0",
66
69
  "babel-loader": "8.2.4",
67
70
  "babel-preset-react-app": "10.0.1",
68
71
  "browserslist": "4.20.2",