@modern-js-app/eslint-config 1.0.1 → 1.1.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.
- package/CHANGELOG.md +23 -0
- package/README.md +1 -4
- package/eslintrc.js +4 -6
- package/eslintrc.prettier.js +9 -0
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @modern-js-app/eslint-config
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a37192b1: feat: support css module declaration
|
|
8
|
+
|
|
9
|
+
## 1.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 235f9e8d: fix crlf problem in windows lint
|
|
14
|
+
|
|
15
|
+
## 1.1.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 96119db2: Relese v1.1.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [96119db2]
|
|
24
|
+
- @modern-js/babel-preset-app@1.1.0
|
|
25
|
+
|
|
3
26
|
## 1.0.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
- [迈入现代 Web 开发](https://zhuanlan.zhihu.com/p/386607009)
|
|
22
|
-
- [现代 Web 开发者问卷调查报告](https://zhuanlan.zhihu.com/p/403206195)
|
|
23
|
-
- [字节跳动是如何落地微前端的](https://mp.weixin.qq.com/s/L9wbfNG5fTXF5bx7dcgj4Q)
|
|
20
|
+
- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)
|
|
24
21
|
|
|
25
22
|
## Getting Started
|
|
26
23
|
|
package/eslintrc.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-lines, no-magic-numbers */
|
|
2
2
|
// const path = require('path');
|
|
3
3
|
|
|
4
|
-
const { upath } = require('@modern-js/utils');
|
|
5
4
|
const { jsExtensions } = require('./utils');
|
|
6
5
|
|
|
7
6
|
module.exports = {
|
|
@@ -16,9 +15,7 @@ module.exports = {
|
|
|
16
15
|
},
|
|
17
16
|
sourceType: 'module',
|
|
18
17
|
babelOptions: {
|
|
19
|
-
configFile:
|
|
20
|
-
require.resolve('@modern-js/babel-preset-app'),
|
|
21
|
-
),
|
|
18
|
+
configFile: require.resolve('@modern-js/babel-preset-app'),
|
|
22
19
|
},
|
|
23
20
|
},
|
|
24
21
|
// https://www.npmjs.com/package/@babel/eslint-parser
|
|
@@ -220,7 +217,7 @@ module.exports = {
|
|
|
220
217
|
// https://eslint.org/docs/rules/guard-for-in
|
|
221
218
|
'guard-for-in': 'off',
|
|
222
219
|
// https://eslint.org/docs/rules/max-classes-per-file
|
|
223
|
-
'max-classes-per-file': ['error',
|
|
220
|
+
'max-classes-per-file': ['error', 3],
|
|
224
221
|
// https://eslint.org/docs/rules/no-alert
|
|
225
222
|
'no-alert': 'error',
|
|
226
223
|
// https://eslint.org/docs/rules/no-caller
|
|
@@ -1000,6 +997,7 @@ module.exports = {
|
|
|
1000
997
|
bracketSpacing: true,
|
|
1001
998
|
jsxBracketSameLine: true,
|
|
1002
999
|
arrowParens: 'avoid',
|
|
1000
|
+
endOfLine: 'auto',
|
|
1003
1001
|
},
|
|
1004
1002
|
],
|
|
1005
1003
|
|
|
@@ -1720,7 +1718,7 @@ module.exports = {
|
|
|
1720
1718
|
// https://github.com/mysticatea/eslint-plugin-node/blob/HEAD/docs/rules/process-exit-as-throw.md
|
|
1721
1719
|
'node/process-exit-as-throw': 'off',
|
|
1722
1720
|
// https://github.com/mysticatea/eslint-plugin-node/blob/HEAD/docs/rules/shebang.md
|
|
1723
|
-
'node/shebang': '
|
|
1721
|
+
'node/shebang': 'off',
|
|
1724
1722
|
// https://github.com/mysticatea/eslint-plugin-node/blob/HEAD/docs/rules/no-deprecated-api.md
|
|
1725
1723
|
'node/no-deprecated-api': 'off',
|
|
1726
1724
|
// https://github.com/mysticatea/eslint-plugin-node/blob/HEAD/docs/rules/exports-style.md
|
package/eslintrc.prettier.js
CHANGED
|
@@ -70,5 +70,14 @@ module.exports = {
|
|
|
70
70
|
'filenames/match-exported': 'off',
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
|
+
// ignore auto-generated css module declarations
|
|
74
|
+
{
|
|
75
|
+
files: ['*.css.d.ts'],
|
|
76
|
+
rules: {
|
|
77
|
+
'pre/match-regex': 'off',
|
|
78
|
+
'filenames/match-exported': 'off',
|
|
79
|
+
'prettier/prettier': 'off',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
73
82
|
],
|
|
74
83
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js-app/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "The meta-framework suite designed from scratch for frontend-focused modern web development.",
|
|
5
5
|
"homepage": "https://modernjs.dev",
|
|
6
6
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"prettier": "^2.0.1"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@modern-js/babel-preset-app": "^1.
|
|
37
|
-
"@modern-js/utils": "^1.0.0"
|
|
36
|
+
"@modern-js/babel-preset-app": "^1.1.0"
|
|
38
37
|
},
|
|
39
38
|
"devDependencies": {
|
|
40
39
|
"eslint": "^7.32.0",
|