@sequencemedia/eslint-config-standard 0.1.2 → 0.1.4
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/config/standard.mjs +28 -6
- package/config/stylistic.mjs +3 -0
- package/merge.mjs +2 -2
- package/package.json +4 -2
package/config/standard.mjs
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import n from 'eslint-plugin-n'
|
|
1
|
+
import n from 'eslint-plugin-n'
|
|
2
2
|
import p from 'eslint-plugin-promise'
|
|
3
|
-
import i from 'eslint-plugin-import'
|
|
3
|
+
import i from 'eslint-plugin-import'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
name: '@sequencemedia/eslint-config-standard/standard',
|
|
7
7
|
plugins: {
|
|
8
|
-
n
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
n,
|
|
9
|
+
promise: p,
|
|
10
|
+
import: i
|
|
11
11
|
},
|
|
12
12
|
rules: {
|
|
13
|
+
/**
|
|
14
|
+
* Standard
|
|
15
|
+
*/
|
|
13
16
|
'no-var': 'warn',
|
|
14
17
|
'object-shorthand': ['warn', 'properties'],
|
|
15
18
|
'accessor-pairs': ['error', { setWithoutGet: true, enforceForClassMembers: true }],
|
|
@@ -129,12 +132,31 @@ export default {
|
|
|
129
132
|
}],
|
|
130
133
|
'valid-typeof': ['error', { requireStringLiterals: true }],
|
|
131
134
|
yoda: ['error', 'never'],
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* `eslint-plugin-n`
|
|
138
|
+
*/
|
|
132
139
|
'n/handle-callback-err': ['error', '^(err|error)$'],
|
|
133
140
|
'n/no-callback-literal': 'error',
|
|
134
141
|
'n/no-deprecated-api': 'error',
|
|
135
142
|
'n/no-exports-assign': 'error',
|
|
136
143
|
'n/no-new-require': 'error',
|
|
137
144
|
'n/no-path-concat': 'error',
|
|
138
|
-
'n/process-exit-as-throw': 'error'
|
|
145
|
+
'n/process-exit-as-throw': 'error',
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* `eslint-plugin-promise`
|
|
149
|
+
*/
|
|
150
|
+
'promise/param-names': 'error',
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* `eslint-plugin-import`
|
|
154
|
+
*/
|
|
155
|
+
'import/export': 'error',
|
|
156
|
+
'import/first': 'error',
|
|
157
|
+
'import/no-absolute-path': ['error', { esmodule: true, commonjs: true, amd: false }],
|
|
158
|
+
'import/no-duplicates': 'error',
|
|
159
|
+
'import/no-named-default': 'error',
|
|
160
|
+
'import/no-webpack-loader-syntax': 'error'
|
|
139
161
|
}
|
|
140
162
|
}
|
package/config/stylistic.mjs
CHANGED
|
@@ -6,6 +6,9 @@ export default {
|
|
|
6
6
|
'@stylistic': stylistic
|
|
7
7
|
},
|
|
8
8
|
rules: {
|
|
9
|
+
/**
|
|
10
|
+
* `@stylistic/eslint-plugin`
|
|
11
|
+
*/
|
|
9
12
|
'@stylistic/array-bracket-spacing': ['error', 'never'],
|
|
10
13
|
'@stylistic/arrow-spacing': ['error', { before: true, after: true }],
|
|
11
14
|
'@stylistic/block-spacing': ['error', 'always'],
|
package/merge.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import getMapMerge from '@sequencemedia/eslint-merge/get-map-merge'
|
|
2
2
|
|
|
3
3
|
import eslintConfig from './index.mjs'
|
|
4
4
|
|
|
5
5
|
export default function mergeESLintConfigWith (config) {
|
|
6
6
|
return (
|
|
7
7
|
eslintConfig
|
|
8
|
-
.map(
|
|
8
|
+
.map(getMapMerge(config))
|
|
9
9
|
)
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequencemedia/eslint-config-standard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Standard configuration for ESLint 9",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"JavaScript Standard Style",
|
|
@@ -51,9 +51,11 @@
|
|
|
51
51
|
"test": "mocha test --recursive --verbose --color"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@sequencemedia/eslint-merge": "^0.0.
|
|
54
|
+
"@sequencemedia/eslint-merge": "^0.0.1",
|
|
55
55
|
"@stylistic/eslint-plugin": "^2.11.0",
|
|
56
|
+
"eslint-plugin-import": "^2.31.0",
|
|
56
57
|
"eslint-plugin-n": "^17.14.0",
|
|
58
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
57
59
|
"globals": "^15.13.0"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|