eslint-config-simplesense 2.0.0 → 2.3.0
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 +29 -0
- package/README.md +1 -1
- package/index.js +2 -0
- package/package.json +12 -8
- package/plugins/eslint-recommended.js +1 -6
- package/plugins/node.js +16 -2
- package/plugins/unicorn.js +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
Changelog
|
|
2
|
+
## [2.3.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.2.0...2.3.0) (2022-01-04)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* adds new unicorn rules no-thenable, no-useless-promise-resolve-reject ([dee451d](https://github.com/simplesenseio/eslint-config-simplesense/commit/dee451df2019fbff57f8e34f58f4c89666ae8579))
|
|
8
|
+
|
|
9
|
+
## [2.2.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.1.1...2.2.0) (2021-12-27)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* eslint-plugin-node settings for no-missing-require and no-unpublished-require ([2856955](https://github.com/simplesenseio/eslint-config-simplesense/commit/2856955b3887dd4b70d887edf397690845a96229)), closes [SI-1201495731599439](https://app.asana.com/0/0/1201495731599439)
|
|
15
|
+
|
|
16
|
+
### [2.1.1](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.1.0...2.1.1) (2021-12-20)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Code Refactoring
|
|
20
|
+
|
|
21
|
+
* includes .github/actions in the ignore patterns ([856cb1d](https://github.com/simplesenseio/eslint-config-simplesense/commit/856cb1dd80dc1d42d1acd4ba404d6aa55a658464))
|
|
22
|
+
|
|
23
|
+
## [2.1.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.0.0...2.1.0) (2021-12-02)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* adds node_modules mapping to lambda layers ([67424b6](https://github.com/simplesenseio/eslint-config-simplesense/commit/67424b6048b0a000c6b9aba19f58710ee5395023))
|
|
29
|
+
* modifies rules for .vue files ([6526864](https://github.com/simplesenseio/eslint-config-simplesense/commit/6526864a948134122cad3c10583db6e5506f4c44))
|
|
30
|
+
|
|
2
31
|
## [2.0.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/1.2.0...2.0.0) (2021-12-01)
|
|
3
32
|
|
|
4
33
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SimpleSense ESLint Config
|
|
2
2
|
|
|
3
3
|
[](https://simplesenseio.github.io/eslint-config-simplesense/)
|
|
4
|
-
[](https://github.com/simplesenseio/eslint-config-simplesense/actions/workflows/build.yaml)
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
## Generating Documentation
|
package/index.js
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
'!.*',
|
|
43
43
|
'.cache/',
|
|
44
44
|
'.git/',
|
|
45
|
+
'.github/actions/',
|
|
45
46
|
'.npm/',
|
|
46
47
|
'.nyc_output/',
|
|
47
48
|
'coverage/',
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
],
|
|
64
65
|
plugins: ['vue'],
|
|
65
66
|
rules: {
|
|
67
|
+
'unicorn/filename-case': [ 'error', { case: 'pascalCase' }],
|
|
66
68
|
'vue/component-name-in-template-casing': [ 'error', 'kebab-case' ],
|
|
67
69
|
'vue/component-definition-name-casing': [ 'error', 'kebab-case' ],
|
|
68
70
|
'vue/singleline-html-element-content-newline': 'off',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-simplesense",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "ESLint Config for SimpleSense Styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -47,29 +47,33 @@
|
|
|
47
47
|
"setupFiles": [
|
|
48
48
|
"<rootDir>/test/setup/global-functions.js"
|
|
49
49
|
],
|
|
50
|
+
"testPathIgnorePatterns": [
|
|
51
|
+
"/node_modules/",
|
|
52
|
+
"<rootDir>/\\.github/"
|
|
53
|
+
],
|
|
50
54
|
"verbose": true
|
|
51
55
|
},
|
|
52
56
|
"dependencies": {
|
|
53
57
|
"eslint-plugin-array-func": "^3.1.7",
|
|
54
58
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
55
|
-
"eslint-plugin-import": "^2.25.
|
|
59
|
+
"eslint-plugin-import": "^2.25.4",
|
|
56
60
|
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
57
61
|
"eslint-plugin-node": "^11.1.0",
|
|
58
62
|
"eslint-plugin-optimize-regex": "^1.2.1",
|
|
59
63
|
"eslint-plugin-regexp": "^1.5.1",
|
|
60
64
|
"eslint-plugin-security": "^1.4.0",
|
|
61
65
|
"eslint-plugin-sonarjs": "^0.11.0",
|
|
62
|
-
"eslint-plugin-unicorn": "^
|
|
63
|
-
"eslint-plugin-vue": "^8.
|
|
66
|
+
"eslint-plugin-unicorn": "^40.0.0",
|
|
67
|
+
"eslint-plugin-vue": "^8.2.0",
|
|
64
68
|
"eslint-plugin-yml": "^0.12.0"
|
|
65
69
|
},
|
|
66
70
|
"devDependencies": {
|
|
67
|
-
"@vuepress/plugin-pwa": "^1.
|
|
68
|
-
"eslint": "^8.
|
|
71
|
+
"@vuepress/plugin-pwa": "^1.9.5",
|
|
72
|
+
"eslint": "^8.6.0",
|
|
69
73
|
"hash-sum": "^2.0.0",
|
|
70
|
-
"jest": "^27.4.
|
|
74
|
+
"jest": "^27.4.5",
|
|
71
75
|
"sort-package-json": "^1.53.1",
|
|
72
|
-
"vuepress": "^1.
|
|
76
|
+
"vuepress": "^1.9.5",
|
|
73
77
|
"vuepress-theme-default-prefers-color-scheme": "^2.0.0"
|
|
74
78
|
},
|
|
75
79
|
"peerDependencies": {
|
|
@@ -199,12 +199,7 @@
|
|
|
199
199
|
'semi-spacing': [ 'error', { after: true, before: false }],
|
|
200
200
|
'semi-style': [ 'error', 'last' ],
|
|
201
201
|
semi: [ 'error', 'always' ],
|
|
202
|
-
'sort-imports':
|
|
203
|
-
'error', {
|
|
204
|
-
allowSeparatedGroups: true,
|
|
205
|
-
ignoreCase: false,
|
|
206
|
-
},
|
|
207
|
-
],
|
|
202
|
+
'sort-imports': 'off',
|
|
208
203
|
'sort-vars': [ 'error', { ignoreCase: false }],
|
|
209
204
|
'space-before-blocks': [ 'error', 'always' ],
|
|
210
205
|
'space-before-function-paren': [ 'error', 'never' ],
|
package/plugins/node.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
4
6
|
const NODE_VERSION = '>=14.0.0';
|
|
7
|
+
const ROOT_DIR = path.resolve(__dirname, '../../../');
|
|
5
8
|
|
|
6
9
|
module.exports = {
|
|
7
10
|
'node/callback-return': [
|
|
@@ -17,7 +20,12 @@
|
|
|
17
20
|
'node/handle-callback-err': ['error'],
|
|
18
21
|
'node/no-deprecated-api': [ 'error', { version: NODE_VERSION }],
|
|
19
22
|
'node/no-missing-import': ['error'],
|
|
20
|
-
'node/no-missing-require': [
|
|
23
|
+
'node/no-missing-require': [
|
|
24
|
+
'error', {
|
|
25
|
+
allowModules: ['aws-sdk'],
|
|
26
|
+
resolvePaths: [path.resolve(__dirname, `${ ROOT_DIR }/lambda/layers/node-modules/nodejs/node_modules`)],
|
|
27
|
+
},
|
|
28
|
+
],
|
|
21
29
|
'node/no-mixed-requires': [ 'error', { allowCall: true, grouping: true }],
|
|
22
30
|
'node/no-new-require': ['error'],
|
|
23
31
|
'node/no-path-concat': ['error'],
|
|
@@ -26,7 +34,13 @@
|
|
|
26
34
|
'node/no-unsupported-features/node-builtins': [ 'error', { version: NODE_VERSION }],
|
|
27
35
|
'node/no-unpublished-bin': ['error'],
|
|
28
36
|
'node/no-unpublished-import': ['error'],
|
|
29
|
-
'node/no-unpublished-require': [
|
|
37
|
+
'node/no-unpublished-require': [
|
|
38
|
+
'error', {
|
|
39
|
+
convertPath: {
|
|
40
|
+
[`${ path.relative(ROOT_DIR, '/opt/nodejs') }/*`]: [ '^(.*?)/opt/nodejs/(.*?)$', 'lambda/layers/$2/nodejs/$2' ],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
],
|
|
30
44
|
'node/prefer-global/buffer': [ 'error', 'always' ],
|
|
31
45
|
'node/prefer-global/console': [ 'error', 'always' ],
|
|
32
46
|
'node/prefer-global/process': [ 'error', 'always' ],
|
package/plugins/unicorn.js
CHANGED
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
'unicorn/no-instanceof-array': ['error'],
|
|
19
19
|
'unicorn/no-new-array': ['error'],
|
|
20
20
|
'unicorn/no-process-exit': ['error'],
|
|
21
|
+
'unicorn/no-thenable': ['error'],
|
|
21
22
|
'unicorn/no-this-assignment': ['error'],
|
|
22
23
|
'unicorn/no-unsafe-regex': ['error'],
|
|
23
24
|
'unicorn/no-unused-properties': ['error'],
|
|
25
|
+
'unicorn/no-useless-promise-resolve-reject': ['error'],
|
|
24
26
|
'unicorn/no-useless-undefined': ['error'],
|
|
25
27
|
'unicorn/no-zero-fractions': ['error'],
|
|
26
28
|
'unicorn/number-literal-case': ['error'],
|