@modern-js-app/eslint-config 1.2.5 → 1.2.6
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 +13 -0
- package/base.js +1 -25
- package/index.js +1 -1
- package/jest.config.js +0 -1
- package/package.json +2 -2
- package/ts.js +0 -11
- package/ts.withType.js +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @modern-js-app/eslint-config
|
|
2
2
|
|
|
3
|
+
## 1.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8e737893: feat: disable promise/prefer-await-to-then
|
|
8
|
+
- 8e737893: feat: disable require-atomic-updates
|
|
9
|
+
- a2761eb7: fix: exclude modern.config.ts from with type rules
|
|
10
|
+
- 8e737893: feat: disable no-shadow
|
|
11
|
+
- 8e737893: feat: disable @typescript-eslint/no-base-to-string
|
|
12
|
+
- 8e737893: feat: disable filenames/match-exported
|
|
13
|
+
- Updated dependencies [9d4a005b]
|
|
14
|
+
- @modern-js/babel-preset-app@1.2.5
|
|
15
|
+
|
|
3
16
|
## 1.2.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/base.js
CHANGED
|
@@ -97,7 +97,7 @@ module.exports = {
|
|
|
97
97
|
|
|
98
98
|
/*
|
|
99
99
|
* https://eslint.org/docs/rules/no-debugger
|
|
100
|
-
* @TIPS: for non-
|
|
100
|
+
* @TIPS: for non-VS Code users, please use `debugger // eslint-disable-line`
|
|
101
101
|
* instead of `debugger` to avoid it to be removed by IDE's autoFixOnSave feature
|
|
102
102
|
*/
|
|
103
103
|
'no-debugger': 'error',
|
|
@@ -155,10 +155,6 @@ module.exports = {
|
|
|
155
155
|
'no-unsafe-finally': 'error',
|
|
156
156
|
// https://eslint.org/docs/rules/no-unsafe-negation
|
|
157
157
|
'no-unsafe-negation': 'error',
|
|
158
|
-
// https://eslint.org/docs/rules/require-atomic-updates
|
|
159
|
-
// @bug https://github.com/eslint/eslint/issues/11899
|
|
160
|
-
'require-atomic-updates': 'warn',
|
|
161
|
-
// 'require-atomic-updates': 'error',
|
|
162
158
|
// https://eslint.org/docs/rules/use-isnan
|
|
163
159
|
'use-isnan': 'error',
|
|
164
160
|
// https://eslint.org/docs/rules/valid-typeof
|
|
@@ -427,17 +423,6 @@ module.exports = {
|
|
|
427
423
|
// @CUSTOM
|
|
428
424
|
],
|
|
429
425
|
|
|
430
|
-
/*
|
|
431
|
-
* https://eslint.org/docs/rules/no-shadow
|
|
432
|
-
* "no-shadow": "off",
|
|
433
|
-
*/
|
|
434
|
-
'no-shadow': [
|
|
435
|
-
'error',
|
|
436
|
-
{
|
|
437
|
-
builtinGlobals: false,
|
|
438
|
-
allow: [],
|
|
439
|
-
},
|
|
440
|
-
],
|
|
441
426
|
// https://eslint.org/docs/rules/no-shadow-restricted-names
|
|
442
427
|
'no-shadow-restricted-names': 'error',
|
|
443
428
|
// https://eslint.org/docs/rules/no-undef
|
|
@@ -1363,8 +1348,6 @@ module.exports = {
|
|
|
1363
1348
|
* use Camel Case for others
|
|
1364
1349
|
*/
|
|
1365
1350
|
'filenames/match-regex': ['error', '^[\\[\\]_a-zA-Z0-9.-]+$'],
|
|
1366
|
-
// https://www.npmjs.com/package/eslint-plugin-filenames#matching-exported-values-match-exported
|
|
1367
|
-
'filenames/match-exported': ['error', ['kebab', 'camel', 'pascal']],
|
|
1368
1351
|
// https://www.npmjs.com/package/eslint-plugin-filenames#dont-allow-indexjs-files-no-index
|
|
1369
1352
|
'filenames/no-index': 'off',
|
|
1370
1353
|
|
|
@@ -1394,12 +1377,6 @@ module.exports = {
|
|
|
1394
1377
|
// https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/valid-params.md
|
|
1395
1378
|
'promise/valid-params': 'error',
|
|
1396
1379
|
|
|
1397
|
-
/*
|
|
1398
|
-
* https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/prefer-await-to-then.md
|
|
1399
|
-
* @CUSTOM
|
|
1400
|
-
*/
|
|
1401
|
-
'promise/prefer-await-to-then': 'error',
|
|
1402
|
-
|
|
1403
1380
|
/*
|
|
1404
1381
|
* https://github.com/xjamundx/eslint-plugin-promise/blob/master/docs/rules/prefer-await-to-callbacks.md
|
|
1405
1382
|
* @CUSTOM
|
|
@@ -1564,7 +1541,6 @@ module.exports = {
|
|
|
1564
1541
|
files: ['**/pages/**/_*', '**/pages/**/index.*', '**/pages/**/\\[**'],
|
|
1565
1542
|
rules: {
|
|
1566
1543
|
'filenames/match-regex': 'off',
|
|
1567
|
-
'filenames/match-exported': 'off',
|
|
1568
1544
|
},
|
|
1569
1545
|
},
|
|
1570
1546
|
{
|
package/index.js
CHANGED
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js-app/eslint-config",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
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",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prettier": "^2.5.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@modern-js/babel-preset-app": "^1.2.
|
|
35
|
+
"@modern-js/babel-preset-app": "^1.2.5"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"eslint": "^7.32.0",
|
package/ts.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
1
|
const { jsExtensions } = require('./utils');
|
|
3
2
|
|
|
4
3
|
module.exports = {
|
|
@@ -391,15 +390,6 @@ module.exports = {
|
|
|
391
390
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
|
|
392
391
|
'no-redeclare': 'off',
|
|
393
392
|
'@typescript-eslint/no-redeclare': ['error', { builtinGlobals: true }],
|
|
394
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
|
|
395
|
-
'no-shadow': 'off',
|
|
396
|
-
'@typescript-eslint/no-shadow': [
|
|
397
|
-
'error',
|
|
398
|
-
{
|
|
399
|
-
builtinGlobals: false,
|
|
400
|
-
allow: [],
|
|
401
|
-
},
|
|
402
|
-
],
|
|
403
393
|
|
|
404
394
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md
|
|
405
395
|
'space-before-function-paren': 'off',
|
|
@@ -418,4 +408,3 @@ module.exports = {
|
|
|
418
408
|
},
|
|
419
409
|
],
|
|
420
410
|
};
|
|
421
|
-
/* eslint-enable max-lines */
|
package/ts.withType.js
CHANGED
|
@@ -2,7 +2,8 @@ module.exports = {
|
|
|
2
2
|
overrides: [
|
|
3
3
|
{
|
|
4
4
|
files: ['*.ts', '*.d.ts', '*.tsx'],
|
|
5
|
-
|
|
5
|
+
// modern.config.ts is usually not included in tsconfig.json
|
|
6
|
+
excludedFiles: ['modern.config.ts'],
|
|
6
7
|
parserOptions: {
|
|
7
8
|
ecmaFeatures: { jsx: true },
|
|
8
9
|
// don't set tsconfigRootDir, using the path relative to the cwd
|
|
@@ -23,11 +24,6 @@ module.exports = {
|
|
|
23
24
|
],
|
|
24
25
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
|
|
25
26
|
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
|
|
26
|
-
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
|
|
27
|
-
'@typescript-eslint/restrict-template-expressions': [
|
|
28
|
-
'error',
|
|
29
|
-
{ allowNumber: true, allowAny: true },
|
|
30
|
-
],
|
|
31
27
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-base-to-string.md
|
|
32
28
|
'@typescript-eslint/no-base-to-string': 'error',
|
|
33
29
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
|