@frontify/eslint-config-basic 0.16.0 → 0.17.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.
Files changed (2) hide show
  1. package/index.js +72 -19
  2. package/package.json +6 -3
package/index.js CHANGED
@@ -6,8 +6,23 @@ module.exports = {
6
6
  browser: true,
7
7
  node: true,
8
8
  },
9
- plugins: ['html', 'unicorn', 'notice', 'prettier'],
10
- extends: ['plugin:jsonc/recommended-with-jsonc', 'plugin:prettier/recommended'],
9
+ plugins: ['html', 'unicorn', 'no-only-tests', 'prettier'],
10
+ extends: [
11
+ 'plugin:jsonc/recommended-with-jsonc',
12
+ 'plugin:yml/standard',
13
+ 'plugin:markdown/recommended',
14
+ 'plugin:prettier/recommended',
15
+ ],
16
+ ignorePatterns: [
17
+ '*.min.*',
18
+ 'dist',
19
+ 'LICENSE*',
20
+ 'coverage',
21
+ 'temp',
22
+ 'package-lock.json',
23
+ 'pnpm-lock.yaml',
24
+ 'yarn.lock',
25
+ ],
11
26
  overrides: [
12
27
  {
13
28
  files: ['*.json', '*.json5'],
@@ -16,11 +31,25 @@ module.exports = {
16
31
  quotes: ['error', 'double'],
17
32
  'quote-props': ['error', 'always'],
18
33
  'comma-dangle': ['error', 'never'],
34
+ semi: 'off',
35
+ 'jsonc/array-bracket-spacing': ['error', 'never'],
36
+ 'jsonc/comma-dangle': ['error', 'never'],
37
+ 'jsonc/comma-style': ['error', 'last'],
38
+ 'jsonc/key-spacing': ['error', { beforeColon: false, afterColon: true }],
39
+ 'jsonc/no-octal-escape': 'error',
40
+ 'jsonc/object-curly-newline': ['error', { multiline: true, consistent: true }],
41
+ 'jsonc/object-curly-spacing': ['error', 'always'],
42
+ 'jsonc/object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }],
19
43
  },
20
44
  },
21
45
  {
22
46
  files: ['*.yaml', '*.yml'],
23
47
  parser: 'yaml-eslint-parser',
48
+ rules: {
49
+ 'spaced-comment': 'off',
50
+ 'yml/quotes': ['error', { prefer: 'single', avoidEscape: false }],
51
+ 'yml/no-empty-document': 'off',
52
+ },
24
53
  },
25
54
  {
26
55
  files: ['package.json'],
@@ -31,28 +60,48 @@ module.exports = {
31
60
  {
32
61
  pathPattern: '^$',
33
62
  order: [
63
+ 'publisher',
34
64
  'name',
65
+ 'displayName',
66
+ 'type',
35
67
  'version',
68
+ 'private',
69
+ 'packageManager',
36
70
  'description',
37
- 'keywords',
71
+ 'author',
38
72
  'license',
39
- 'repository',
40
73
  'funding',
41
- 'author',
42
- 'type',
43
- 'files',
74
+ 'homepage',
75
+ 'repository',
76
+ 'bugs',
77
+ 'keywords',
78
+ 'categories',
79
+ 'sideEffects',
44
80
  'exports',
45
81
  'main',
46
82
  'module',
47
83
  'unpkg',
84
+ 'jsdelivr',
85
+ 'types',
86
+ 'typesVersions',
48
87
  'bin',
88
+ 'icon',
89
+ 'files',
90
+ 'engines',
91
+ 'activationEvents',
92
+ 'contributes',
49
93
  'scripts',
50
- 'husky',
51
- 'lint-staged',
52
94
  'peerDependencies',
53
95
  'peerDependenciesMeta',
54
96
  'dependencies',
97
+ 'optionalDependencies',
55
98
  'devDependencies',
99
+ 'pnpm',
100
+ 'overrides',
101
+ 'resolutions',
102
+ 'husky',
103
+ 'simple-git-hooks',
104
+ 'lint-staged',
56
105
  'eslintConfig',
57
106
  ],
58
107
  },
@@ -60,6 +109,10 @@ module.exports = {
60
109
  pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies$',
61
110
  order: { type: 'asc' },
62
111
  },
112
+ {
113
+ pathPattern: '^exports.*$',
114
+ order: ['types', 'require', 'import'],
115
+ },
63
116
  ],
64
117
  },
65
118
  },
@@ -69,6 +122,12 @@ module.exports = {
69
122
  '@typescript-eslint/no-var-requires': 'off',
70
123
  },
71
124
  },
125
+ {
126
+ files: ['*.d.ts'],
127
+ rules: {
128
+ 'import/no-duplicates': 'off',
129
+ },
130
+ },
72
131
  {
73
132
  files: ['scripts/**/*.*'],
74
133
  rules: {
@@ -76,9 +135,10 @@ module.exports = {
76
135
  },
77
136
  },
78
137
  {
79
- files: ['*.test.ts', '*.test.js', '*.spec.ts', '*.spec.js'],
138
+ files: ['*.test.ts', '*.test.tsx', '*.test.js', '*.spec.ts', '*.spec.tsx', '*.spec.js'],
80
139
  rules: {
81
140
  'no-unused-expressions': 'off',
141
+ 'no-only-tests/no-only-tests': 'error',
82
142
  },
83
143
  },
84
144
  ],
@@ -134,6 +194,7 @@ module.exports = {
134
194
  'unicorn/no-this-assignment': 'error',
135
195
  'unicorn/no-unsafe-regex': 'error',
136
196
  'unicorn/no-useless-length-check': 'error',
197
+ 'unicorn/catch-error-name': 'error',
137
198
 
138
199
  'sort-imports': [
139
200
  'error',
@@ -146,14 +207,6 @@ module.exports = {
146
207
  },
147
208
  ],
148
209
 
149
- 'notice/notice': [
150
- 'error',
151
- {
152
- template: '/* (c) Copyright Frontify Ltd., all rights reserved. */\n\n',
153
- messages: {
154
- whenFailedToMatch: 'No Frontify copyright header set.',
155
- },
156
- },
157
- ],
210
+ 'jsonc/no-dupe-keys': 'error',
158
211
  },
159
212
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontify/eslint-config-basic",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "main": "index.js",
5
5
  "author": "Frontify Developers <developers@frontify.com>",
6
6
  "license": "MIT",
@@ -27,11 +27,14 @@
27
27
  "eslint-config-prettier": "^8.5.0",
28
28
  "eslint-plugin-html": "^7.1.0",
29
29
  "eslint-plugin-jsonc": "^2.5.0",
30
+ "eslint-plugin-markdown": "^3.0.0",
31
+ "eslint-plugin-no-only-tests": "^3.1.0",
30
32
  "eslint-plugin-node": "^11.1.0",
31
- "eslint-plugin-notice": "^0.9.10",
32
33
  "eslint-plugin-prettier": "^4.2.1",
33
34
  "eslint-plugin-promise": "^6.1.1",
34
- "eslint-plugin-unicorn": "^44.0.2"
35
+ "eslint-plugin-unicorn": "^44.0.2",
36
+ "eslint-plugin-yml": "^1.2.0",
37
+ "yaml-eslint-parser": "^1.1.0"
35
38
  },
36
39
  "scripts": {
37
40
  "lint": "eslint . --config=index.js"