@nice-move/eslint-config-base 0.8.11 → 0.8.13
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/lib/mini.cjs +29 -0
- package/lib/node.cjs +10 -2
- package/package.json +3 -3
package/lib/mini.cjs
CHANGED
|
@@ -122,6 +122,35 @@ function generate({ miniprogramRoot, pluginRoot, cloudfunctionRoot }) {
|
|
|
122
122
|
'unicorn/prefer-module': 0,
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
|
+
{
|
|
126
|
+
files: '*.js',
|
|
127
|
+
rules: {
|
|
128
|
+
'n/file-extension-in-import': [
|
|
129
|
+
'error',
|
|
130
|
+
'always',
|
|
131
|
+
{
|
|
132
|
+
'.ts': 'never',
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
'import/extensions': [
|
|
136
|
+
'error',
|
|
137
|
+
'always',
|
|
138
|
+
{
|
|
139
|
+
ignorePackages: true,
|
|
140
|
+
pattern: {
|
|
141
|
+
ts: 'never',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
},
|
|
146
|
+
settings: {
|
|
147
|
+
'import/resolver': {
|
|
148
|
+
node: {
|
|
149
|
+
extensions: ['.ts'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
125
154
|
].filter(Boolean);
|
|
126
155
|
}
|
|
127
156
|
|
package/lib/node.cjs
CHANGED
|
@@ -39,7 +39,7 @@ module.exports = {
|
|
|
39
39
|
},
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
files: '*.{m,c}
|
|
42
|
+
files: '*.{m,c}{t,j}s',
|
|
43
43
|
excludedFiles: '*.nb.*',
|
|
44
44
|
env: {
|
|
45
45
|
node: true,
|
|
@@ -76,7 +76,7 @@ module.exports = {
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
// for node.js
|
|
79
|
-
files: '*.mjs',
|
|
79
|
+
files: ['*.mjs', '*.mts'],
|
|
80
80
|
excludedFiles: '*.nb.*',
|
|
81
81
|
env: {
|
|
82
82
|
browser: false,
|
|
@@ -89,6 +89,9 @@ module.exports = {
|
|
|
89
89
|
module: 'off',
|
|
90
90
|
require: 'off',
|
|
91
91
|
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
files: ['*.mjs', '*.mts', '*.cts'],
|
|
92
95
|
rules: {
|
|
93
96
|
'n/no-unsupported-features/es-syntax': [
|
|
94
97
|
'error',
|
|
@@ -113,6 +116,11 @@ module.exports = {
|
|
|
113
116
|
strict: ['error', 'global'],
|
|
114
117
|
'n/no-exports-assign': 'error',
|
|
115
118
|
'n/no-new-require': 'error',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
files: ['*.cjs', '*.cts'],
|
|
123
|
+
rules: {
|
|
116
124
|
'unicorn/prefer-module': 'off',
|
|
117
125
|
},
|
|
118
126
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-move/eslint-config-base",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.13",
|
|
4
4
|
"description": "A `eslint` config for best practice",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"main": "index.cjs",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@nice-move/eslint-plugin-html": "0.0.0-beta.3",
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
39
|
-
"@typescript-eslint/parser": "^5.
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^5.38.0",
|
|
39
|
+
"@typescript-eslint/parser": "^5.38.0",
|
|
40
40
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
41
41
|
"eslint-config-prettier": "^8.5.0",
|
|
42
42
|
"eslint-plugin-eslint-comments": "^3.2.0",
|