eslint-config-dolmios 1.3.7 → 1.3.9

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 (4) hide show
  1. package/README.md +1 -1
  2. package/index.js +78 -230
  3. package/package.json +11 -8
  4. package/reference.txt +1074 -0
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # eslint-config-dolmios
2
2
 
3
- > A simple ESLint setup using [@typescript-eslint](https://typescript-eslint.io), with Prettier and a couple TSConfig setup.
3
+ > A simple ESLint setup using [@typescript-eslint](https://typescript-eslint.io), with Prettier and a couple TSConfig setups.
4
4
 
5
5
  ## Install
6
6
 
package/index.js CHANGED
@@ -1,88 +1,59 @@
1
1
  module.exports = {
2
- env: {
3
- browser: true,
4
- es6: true,
5
- node: true,
6
- },
7
2
  extends: [
8
- "plugin:@typescript-eslint/recommended",
9
3
  "plugin:import/recommended",
10
- "eslint:recommended",
4
+ "next/core-web-vitals",
5
+ "plugin:@typescript-eslint/recommended",
6
+ "prettier",
11
7
  ],
12
8
  parser: "@typescript-eslint/parser",
13
- plugins: ["sort-keys-fix", "@typescript-eslint"],
14
- root: true,
15
-
9
+ plugins: ["typescript-sort-keys"],
16
10
  rules: {
17
- "@typescript-eslint/brace-style": "off",
18
- "@typescript-eslint/comma-dangle": "off",
19
- "@typescript-eslint/comma-spacing": "off",
20
- "@typescript-eslint/explicit-function-return-type": "error",
21
- "@typescript-eslint/func-call-spacing": "off",
22
- "@typescript-eslint/indent": "off",
23
- "@typescript-eslint/keyword-spacing": "off",
24
- "@typescript-eslint/member-delimiter-style": "off",
25
- "@typescript-eslint/no-explicit-any": "warn",
26
- "@typescript-eslint/no-extra-parens": "off",
27
- "@typescript-eslint/no-extra-semi": "off",
11
+ "@next/next/no-html-link-for-pages": "off",
12
+ "typescript-sort-keys/interface": "error",
13
+ "typescript-sort-keys/string-enum": "error",
14
+ "@typescript-eslint/explicit-function-return-type": "warn",
28
15
  "@typescript-eslint/no-non-null-assertion": "error",
29
- "@typescript-eslint/no-unused-vars": [
30
- "error",
31
- {
32
- args: "none",
33
- ignoreRestSiblings: true,
34
- vars: "all",
35
- },
36
- ],
37
- "@typescript-eslint/no-var-requires": "off",
38
- "@typescript-eslint/object-curly-spacing": "off",
39
- "@typescript-eslint/quotes": 0,
40
- "@typescript-eslint/semi": "off",
41
- "@typescript-eslint/space-before-blocks": "off",
42
- "@typescript-eslint/space-before-function-paren": "off",
43
- "@typescript-eslint/space-infix-ops": "off",
44
- "@typescript-eslint/type-annotation-spacing": "off",
45
- "array-bracket-newline": "off",
46
- "array-bracket-spacing": "off",
47
- "array-element-newline": "off",
48
- "arrow-parens": "off",
49
- "arrow-spacing": "off",
50
- "block-spacing": "off",
51
- "brace-style": "off",
52
- camelcase: [
53
- "error",
54
- {
55
- properties: "never",
56
- },
57
- ],
58
- "comma-dangle": "off",
59
- "comma-spacing": "off",
60
- "comma-style": "off",
61
- "computed-property-spacing": "off",
62
- curly: 0,
63
- "dot-location": "off",
64
- "eol-last": "off",
65
- "func-call-spacing": "off",
66
- "func-names": ["error", "as-needed"],
67
- "function-call-argument-newline": "off",
68
- "function-paren-newline": "off",
69
- "generator-star": "off",
70
- "generator-star-spacing": "off",
71
- "implicit-arrow-linebreak": "off",
72
- "import/export": "error",
16
+ "jsx-a11y/aria-role": "warn",
17
+ "jsx-a11y/autocomplete-valid": "warn",
18
+ "jsx-a11y/click-events-have-key-events": "warn",
19
+ "jsx-a11y/heading-has-content": "warn",
20
+ "jsx-a11y/iframe-has-title": "warn",
21
+ "jsx-a11y/html-has-lang": "warn",
22
+ "jsx-a11y/img-redundant-alt": "warn",
23
+ "jsx-a11y/interactive-supports-focus": "warn",
24
+ "jsx-a11y/label-has-associated-control": "warn",
25
+ "jsx-a11y/lang": "warn",
26
+ "jsx-a11y/media-has-caption": "warn",
27
+ "jsx-a11y/mouse-events-have-key-events": "warn",
28
+ "jsx-a11y/no-access-key": "warn",
29
+ "jsx-a11y/no-autofocus": "warn",
30
+ "jsx-a11y/no-distracting-elements": "warn",
31
+ "jsx-a11y/no-redundant-roles": "warn",
32
+ "jsx-a11y/no-static-element-interactions": "warn",
33
+ "jsx-a11y/scope": "warn",
73
34
  "import/first": "warn",
74
- "import/named": "warn",
75
- "import/namespace": "error",
76
- "import/no-deprecated": "error",
77
- "import/no-duplicates": "error",
78
- "import/no-extraneous-dependencies": [
79
- "error",
80
- {
81
- devDependencies: true,
82
- },
83
- ],
84
- "import/no-named-as-default": "off",
85
- "import/no-unresolved": "warn",
35
+ "react/button-has-type": "warn",
36
+ "react/destructuring-assignment": "warn",
37
+ "react/jsx-boolean-value": "warn",
38
+ "react/jsx-filename-extension": "warn",
39
+ "react/jsx-handler-names": "warn",
40
+ "react/jsx-no-bind": "warn",
41
+ "react/jsx-no-useless-fragment": "warn",
42
+ "react/jsx-pascal-case": "warn",
43
+ "react/jsx-sort-props": "warn",
44
+ "react/no-access-state-in-setstate": "warn",
45
+ "react/no-arrow-function-lifecycle": "warn",
46
+ "react/no-danger": "warn",
47
+ "react/no-invalid-html-attribute": "warn",
48
+ "react/no-multi-comp": "warn",
49
+ "react/no-set-state": "warn",
50
+ "react/no-this-in-sfc": "warn",
51
+ "react/no-typos": "warn",
52
+ "react/no-unused-state": "warn",
53
+ "react/self-closing-comp": "warn",
54
+ "react/sort-comp": "warn",
55
+ "react/style-prop-object": "warn",
56
+ "react/void-dom-elements-no-children": "warn",
86
57
  "import/order": [
87
58
  "error",
88
59
  {
@@ -94,159 +65,36 @@ module.exports = {
94
65
  "newlines-between": "always",
95
66
  },
96
67
  ],
97
- indent: "off",
98
- "jsx-quotes": "off",
99
- "key-spacing": "off",
100
- "keyword-spacing": "off",
101
- "linebreak-style": "off",
102
- "lines-around-comment": 0,
103
- "max-len": 0,
104
- "multiline-ternary": "off",
105
- "new-parens": "off",
106
- "newline-per-chained-call": "off",
107
- "no-alert": "error",
108
- "no-array-constructor": "error",
109
- "no-arrow-condition": "off",
110
- "no-comma-dangle": "off",
111
- "no-confusing-arrow": 0,
112
- "no-console": [
113
- "warn",
114
- {
115
- allow: ["error", "warn"],
116
- },
117
- ],
118
-
119
- "no-continue": "error",
120
- "no-duplicate-imports": [
121
- "error",
122
- {
123
- includeExports: true,
124
- },
125
- ],
126
- "no-eq-null": "error",
127
- "no-eval": "error",
128
- "no-extend-native": "error",
129
- "no-extra-bind": "error",
130
- "no-extra-label": "error",
131
- "no-extra-parens": "off",
132
- "no-extra-semi": "off",
133
- "no-floating-decimal": "off",
134
- "no-invalid-this": "error",
135
- "no-iterator": "error",
136
- "no-label-var": "error",
137
- "no-labels": [
138
- "error",
139
- {
140
- allowLoop: false,
141
- allowSwitch: false,
142
- },
143
- ],
144
- "no-lone-blocks": "error",
145
- "no-mixed-operators": [
146
- "error",
147
- {
148
- allowSamePrecedence: false,
149
- groups: [
150
- ["&", "|", "^", "~", "<<", ">>", ">>>"],
151
- ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
152
- ["&&", "||"],
153
- ["in", "instanceof"],
154
- ],
155
- },
156
- ],
157
- "no-mixed-spaces-and-tabs": "off",
158
- "no-multi-spaces": "off",
159
- "no-multi-str": "error",
160
- "no-multiple-empty-lines": "off",
161
- "no-new": "error",
162
- "no-new-func": "error",
163
- "no-new-object": "error",
164
- "no-new-wrappers": "error",
165
- "no-octal-escape": "error",
166
- "no-proto": "error",
167
- "no-reserved-keys": "off",
168
- "no-space-before-semi": "off",
169
- "no-tabs": 0,
170
- "no-template-curly-in-string": "error",
171
- "no-trailing-spaces": "off",
172
- "no-undef": "off",
173
- "no-unexpected-multiline": 0,
68
+ "no-alert": "warn",
69
+ "no-console": "warn",
70
+ "no-empty": "warn",
71
+ "no-duplicate-imports": "warn",
72
+ "no-eq-null": "warn",
73
+ "no-eval": "warn",
74
+ "no-extra-bind": "warn",
75
+ "no-extra-label": "warn",
76
+ "no-invalid-this": "warn",
77
+ "no-iterator": "warn",
78
+ "no-label-var": "warn",
79
+ "no-labels": "warn",
80
+ "no-lone-blocks": "warn",
81
+ "no-multi-str": "warn",
82
+ "no-new": "warn",
83
+ "no-octal-escape": "warn",
84
+ "no-proto": "warn",
85
+ "no-template-curly-in-string": "warn",
174
86
  "no-unreachable-loop": "error",
175
- "no-unused-expressions": [
176
- "error",
177
- {
178
- allowShortCircuit: true,
179
- allowTernary: true,
180
- enforceForJSX: true,
181
- },
182
- ],
183
- "no-use-before-define": [
184
- "error",
185
- {
186
- classes: true,
187
- functions: false,
188
- },
189
- ],
190
- "no-useless-call": "error",
191
- "no-useless-concat": "error",
192
- "no-whitespace-before-property": "off",
193
- "no-wrap-func": "off",
194
- "nonblock-statement-body-position": "off",
195
- "object-curly-newline": "off",
196
- "object-curly-spacing": "off",
197
- "object-property-newline": "off",
198
- "one-var": [
199
- "error",
200
- {
201
- initialized: "never",
202
- },
203
- ],
204
- "one-var-declaration-per-line": "off",
205
- "operator-linebreak": "off",
206
- "padded-blocks": "off",
207
- "quote-props": "off",
208
- quotes: 0,
209
- "rest-spread-spacing": "off",
210
- semi: "off",
211
- "semi-spacing": "off",
212
- "semi-style": "off",
213
- "sort-keys-fix/sort-keys-fix": "error",
214
- "space-after-function-name": "off",
215
- "space-after-keywords": "off",
216
- "space-before-blocks": "off",
217
- "space-before-function-paren": "off",
218
- "space-before-function-parentheses": "off",
219
- "space-before-keywords": "off",
220
- "space-in-brackets": "off",
221
- "space-in-parens": "off",
222
- "space-infix-ops": "error",
223
- "space-return-throw-case": "off",
224
- "space-unary-ops": [
225
- "error",
226
- {
227
- nonwords: false,
228
- words: true,
229
- },
230
- ],
231
- "space-unary-word-ops": "off",
232
- "spaced-comment": [
233
- "error",
234
- "always",
235
- {
236
- line: {
237
- exceptions: ["-"],
238
- },
239
- },
240
- ],
241
- "switch-colon-spacing": "off",
242
- "template-curly-spacing": ["error", "never"],
243
- "template-tag-spacing": "off",
244
- "unicode-bom": "off",
245
- "vue/html-self-closing": 0,
246
- "vue/max-len": 0,
247
- "wrap-iife": "off",
248
- "wrap-regex": "off",
249
- "yield-star-spacing": "off",
250
- yoda: ["error", "never"],
87
+ "no-unused-expressions": "warn",
88
+ "no-useless-call": "warn",
89
+ "no-useless-concat": "warn",
90
+ "no-useless-escape": "warn",
91
+ "no-useless-return": "warn",
92
+ "no-use-before-define": "warn",
93
+ yoda: "warn",
94
+ },
95
+ settings: {
96
+ next: {
97
+ rootDir: "./",
98
+ },
251
99
  },
252
100
  };
package/package.json CHANGED
@@ -1,26 +1,28 @@
1
1
  {
2
2
  "name": "eslint-config-dolmios",
3
- "description": " A simple ESLint setup using @typescript-eslint",
4
- "version": "1.3.7",
3
+ "description": "A simple ESLint config with Prettier and a couple TSConfig setups",
4
+ "version": "1.3.9",
5
5
  "author": "Jackson Dolman <mail@dolmios.com>",
6
6
  "bugs": {
7
7
  "url": "https://github.com/dolmios/eslint-config-dolmios/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@typescript-eslint/eslint-plugin": "^5.47.1",
11
- "@typescript-eslint/parser": "^5.47.1",
10
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
11
+ "@typescript-eslint/parser": "^5.48.0",
12
12
  "eslint": "^8.31.0",
13
- "eslint-plugin-import": "^2.26.0",
14
- "eslint-plugin-sort-keys-fix": "^1.1.2",
13
+ "eslint-config-next": "^13.1.1",
14
+ "eslint-config-prettier": "^8.6.0",
15
+ "eslint-plugin-typescript-sort-keys": "^2.1.0",
15
16
  "prettier": "^2.8.1",
16
17
  "typescript": "^4.9.4"
17
18
  },
18
19
  "homepage": "https://github.com/dolmios/eslint-config-dolmios#readme",
19
20
  "keywords": [
20
21
  "eslint",
21
- "eslintconfig",
22
+ "config",
22
23
  "linting",
23
- "typescript"
24
+ "typescript",
25
+ "prettier"
24
26
  ],
25
27
  "license": "MIT",
26
28
  "main": "index.js",
@@ -32,6 +34,7 @@
32
34
  "scripts": {
33
35
  "lint": "eslint --ext .js",
34
36
  "prettier": "prettier --write .",
37
+ "print": "eslint --print-config index.js > reference.txt",
35
38
  "tidy": "pnpm lint && pnpm prettier"
36
39
  }
37
40
  }