eslint-config-simplesense 1.2.0 → 2.2.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 CHANGED
@@ -1,4 +1,35 @@
1
1
  Changelog
2
+ ## [2.2.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.1.1...2.2.0) (2021-12-27)
3
+
4
+
5
+ ### Features
6
+
7
+ * 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)
8
+
9
+ ### [2.1.1](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.1.0...2.1.1) (2021-12-20)
10
+
11
+
12
+ ### Code Refactoring
13
+
14
+ * includes .github/actions in the ignore patterns ([856cb1d](https://github.com/simplesenseio/eslint-config-simplesense/commit/856cb1dd80dc1d42d1acd4ba404d6aa55a658464))
15
+
16
+ ## [2.1.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/2.0.0...2.1.0) (2021-12-02)
17
+
18
+
19
+ ### Features
20
+
21
+ * adds node_modules mapping to lambda layers ([67424b6](https://github.com/simplesenseio/eslint-config-simplesense/commit/67424b6048b0a000c6b9aba19f58710ee5395023))
22
+ * modifies rules for .vue files ([6526864](https://github.com/simplesenseio/eslint-config-simplesense/commit/6526864a948134122cad3c10583db6e5506f4c44))
23
+
24
+ ## [2.0.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/1.2.0...2.0.0) (2021-12-01)
25
+
26
+
27
+ ### ⚠ BREAKING CHANGES
28
+
29
+ * **npm:** Compatible with eslint version 8
30
+
31
+ * **npm:** update dependencies ([1b5b299](https://github.com/simplesenseio/eslint-config-simplesense/commit/1b5b2999429a60802443cd10ccf593cc2023dfcf)), closes [SI-1201171801561261](https://app.asana.com/0/0/1201171801561261)
32
+
2
33
  ## [1.2.0](https://github.com/simplesenseio/eslint-config-simplesense/compare/1.1.2...1.2.0) (2021-11-08)
3
34
 
4
35
 
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": "1.2.0",
3
+ "version": "2.2.0",
4
4
  "description": "ESLint Config for SimpleSense Styles",
5
5
  "keywords": [
6
6
  "eslint",
@@ -41,29 +41,38 @@
41
41
  "index.js",
42
42
  "plugins/*.js"
43
43
  ],
44
+ "moduleNameMapper": {
45
+ "eslint/use-at-your-own-risk": "eslint/lib/unsupported-api"
46
+ },
47
+ "setupFiles": [
48
+ "<rootDir>/test/setup/global-functions.js"
49
+ ],
44
50
  "verbose": true
45
51
  },
46
52
  "dependencies": {
47
53
  "eslint-plugin-array-func": "^3.1.7",
48
54
  "eslint-plugin-eslint-comments": "^3.2.0",
49
- "eslint-plugin-import": "^2.25.2",
55
+ "eslint-plugin-import": "^2.25.3",
50
56
  "eslint-plugin-no-use-extend-native": "^0.5.0",
51
57
  "eslint-plugin-node": "^11.1.0",
52
58
  "eslint-plugin-optimize-regex": "^1.2.1",
53
- "eslint-plugin-regexp": "^1.5.0",
59
+ "eslint-plugin-regexp": "^1.5.1",
54
60
  "eslint-plugin-security": "^1.4.0",
55
- "eslint-plugin-sonarjs": "^0.10.0",
56
- "eslint-plugin-unicorn": "^38.0.0",
57
- "eslint-plugin-vue": "^8.0.3",
58
- "eslint-plugin-yml": "^0.10.1"
61
+ "eslint-plugin-sonarjs": "^0.11.0",
62
+ "eslint-plugin-unicorn": "^39.0.0",
63
+ "eslint-plugin-vue": "^8.2.0",
64
+ "eslint-plugin-yml": "^0.12.0"
59
65
  },
60
66
  "devDependencies": {
61
- "@vuepress/plugin-pwa": "^1.8.2",
62
- "eslint": "^7.32.0",
67
+ "@vuepress/plugin-pwa": "^1.9.5",
68
+ "eslint": "^8.5.0",
63
69
  "hash-sum": "^2.0.0",
64
- "jest": "^27.3.1",
65
- "sort-package-json": "^1.52.0",
66
- "vuepress": "^1.8.2",
70
+ "jest": "^27.4.5",
71
+ "sort-package-json": "^1.53.1",
72
+ "vuepress": "^1.9.5",
67
73
  "vuepress-theme-default-prefers-color-scheme": "^2.0.0"
74
+ },
75
+ "peerDependencies": {
76
+ "eslint": ">=8.0.0"
68
77
  }
69
78
  }
@@ -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': ['error'],
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': ['error'],
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' ],
@@ -43,7 +43,6 @@
43
43
  'unicorn/prefer-string-starts-ends-with': ['error'],
44
44
  'unicorn/prefer-string-trim-start-end': ['error'],
45
45
  'unicorn/prefer-type-error': ['error'],
46
- // not yet released
47
46
  'unicorn/require-array-join-separator': ['error'],
48
47
  'unicorn/require-number-to-fixed-digits-argument': ['error'],
49
48
  'unicorn/throw-new-error': ['error'],