eslint-config-dolmios 1.0.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/.eslintrc +3 -0
- package/.gitattributes +2 -0
- package/.prettierrc.json +14 -0
- package/README.md +27 -0
- package/index.js +179 -0
- package/package.json +47 -0
package/.eslintrc
ADDED
package/.gitattributes
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"printWidth": 180,
|
|
3
|
+
"tabWidth": 2,
|
|
4
|
+
"useTabs": false,
|
|
5
|
+
"semi": true,
|
|
6
|
+
"singleQuote": true,
|
|
7
|
+
"trailingComma": "es5",
|
|
8
|
+
"bracketSpacing": true,
|
|
9
|
+
"bracketSameLine": true,
|
|
10
|
+
"jsxSingleQuote": true,
|
|
11
|
+
"arrowParens": "always",
|
|
12
|
+
"proseWrap": "always",
|
|
13
|
+
"jsxBracketSameLine": true
|
|
14
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# eslint-config-dolmios
|
|
2
|
+
|
|
3
|
+
My personal ESLint configuration preferences.
|
|
4
|
+
|
|
5
|
+
### Installation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
yarn add eslint-config-dolmios
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Usage
|
|
12
|
+
|
|
13
|
+
Populate `.eslintrc` with the following, and code away.
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"extends": ["dolmios"]
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Usage with Prettier
|
|
22
|
+
|
|
23
|
+
Prettier is configured to work nicely with this config, though is an optional inclusion. If you'd like to include the config, you can add it to `package.json`.
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
"prettier": "eslint-config-dolmios/.prettierrc.json"
|
|
27
|
+
```
|
package/index.js
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
node: true,
|
|
5
|
+
},
|
|
6
|
+
extends: [
|
|
7
|
+
'eslint:recommended',
|
|
8
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
9
|
+
'plugin:@typescript-eslint/recommended',
|
|
10
|
+
'next/core-web-vitals',
|
|
11
|
+
'prettier',
|
|
12
|
+
'plugin:react-hooks/recommended',
|
|
13
|
+
'plugin:jsx-a11y/recommended',
|
|
14
|
+
],
|
|
15
|
+
parser: '@typescript-eslint/parser',
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaFeatures: {
|
|
18
|
+
jsx: true,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
plugins: ['@typescript-eslint', 'react-hooks', 'sort-keys-fix'],
|
|
22
|
+
root: true,
|
|
23
|
+
rules: {
|
|
24
|
+
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
25
|
+
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
26
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
27
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
28
|
+
'@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
|
+
camelcase: ['error', { properties: 'never' }],
|
|
39
|
+
'comma-spacing': [
|
|
40
|
+
'error',
|
|
41
|
+
{
|
|
42
|
+
after: true,
|
|
43
|
+
before: false,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
'eol-last': ['error', 'always'],
|
|
47
|
+
'func-call-spacing': ['error', 'never'],
|
|
48
|
+
'func-names': ['error', 'as-needed'],
|
|
49
|
+
'import/export': 'error',
|
|
50
|
+
'import/first': 'warn',
|
|
51
|
+
'import/named': 'warn',
|
|
52
|
+
'import/namespace': 'error',
|
|
53
|
+
'import/no-deprecated': 'error',
|
|
54
|
+
'import/no-duplicates': 'error',
|
|
55
|
+
'import/no-extraneous-dependencies': [
|
|
56
|
+
'error',
|
|
57
|
+
{
|
|
58
|
+
devDependencies: true,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
'import/no-named-as-default': 'off',
|
|
62
|
+
'import/no-unresolved': [
|
|
63
|
+
'error',
|
|
64
|
+
{
|
|
65
|
+
ignore: ['^@'],
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'import/order': [
|
|
69
|
+
'error',
|
|
70
|
+
{
|
|
71
|
+
alphabetize: {
|
|
72
|
+
caseInsensitive: true,
|
|
73
|
+
order: 'asc',
|
|
74
|
+
},
|
|
75
|
+
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
|
|
76
|
+
'newlines-between': 'always',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
'jsx-a11y/anchor-is-valid': 'off',
|
|
80
|
+
'jsx-a11y/label-has-associated-control': [
|
|
81
|
+
'error',
|
|
82
|
+
{
|
|
83
|
+
assert: 'either',
|
|
84
|
+
controlComponents: [],
|
|
85
|
+
depth: 25,
|
|
86
|
+
labelAttributes: [],
|
|
87
|
+
labelComponents: [],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
'jsx-a11y/media-has-caption': 'off',
|
|
91
|
+
'no-alert': 'error',
|
|
92
|
+
'no-array-constructor': 'error',
|
|
93
|
+
'no-console': [
|
|
94
|
+
'error',
|
|
95
|
+
{
|
|
96
|
+
allow: ['error', 'warn'],
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
'no-continue': 'error',
|
|
100
|
+
'no-duplicate-imports': ['error', { includeExports: true }],
|
|
101
|
+
'no-eq-null': 'error',
|
|
102
|
+
'no-eval': 'error',
|
|
103
|
+
'no-extend-native': 'error',
|
|
104
|
+
'no-extra-bind': 'error',
|
|
105
|
+
'no-extra-label': 'error',
|
|
106
|
+
'no-extra-parens': ['error', 'functions'],
|
|
107
|
+
'no-invalid-this': 'error',
|
|
108
|
+
'no-iterator': 'error',
|
|
109
|
+
'no-label-var': 'error',
|
|
110
|
+
'no-labels': ['error', { allowLoop: false, allowSwitch: false }],
|
|
111
|
+
'no-lone-blocks': 'error',
|
|
112
|
+
'no-mixed-operators': [
|
|
113
|
+
'error',
|
|
114
|
+
{
|
|
115
|
+
allowSamePrecedence: false,
|
|
116
|
+
groups: [
|
|
117
|
+
['&', '|', '^', '~', '<<', '>>', '>>>'],
|
|
118
|
+
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
|
|
119
|
+
['&&', '||'],
|
|
120
|
+
['in', 'instanceof'],
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
'no-mixed-spaces-and-tabs': 'error',
|
|
125
|
+
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
|
|
126
|
+
'no-multi-str': 'error',
|
|
127
|
+
'no-multiple-empty-lines': ['error', { max: 1 }],
|
|
128
|
+
'no-new': 'error',
|
|
129
|
+
'no-new-func': 'error',
|
|
130
|
+
'no-new-object': 'error',
|
|
131
|
+
'no-new-wrappers': 'error',
|
|
132
|
+
'no-octal-escape': 'error',
|
|
133
|
+
'no-proto': 'error',
|
|
134
|
+
'no-template-curly-in-string': 'error',
|
|
135
|
+
'no-trailing-spaces': 'error',
|
|
136
|
+
'no-unreachable-loop': 'error',
|
|
137
|
+
'no-unused-expressions': [
|
|
138
|
+
'error',
|
|
139
|
+
{
|
|
140
|
+
allowShortCircuit: true,
|
|
141
|
+
allowTernary: true,
|
|
142
|
+
enforceForJSX: true,
|
|
143
|
+
},
|
|
144
|
+
],
|
|
145
|
+
'no-use-before-define': ['error', { classes: true, functions: false }],
|
|
146
|
+
'no-useless-call': 'error',
|
|
147
|
+
'no-useless-concat': 'error',
|
|
148
|
+
'no-whitespace-before-property': 'error',
|
|
149
|
+
'one-var': [
|
|
150
|
+
'error',
|
|
151
|
+
{
|
|
152
|
+
initialized: 'never',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
'react/jsx-sort-props': 1,
|
|
156
|
+
'react/prop-types': 'off',
|
|
157
|
+
'react/react-in-jsx-scope': 'off',
|
|
158
|
+
'react/sort-prop-types': 1,
|
|
159
|
+
semi: ['error', 'always'],
|
|
160
|
+
'semi-spacing': ['error', { after: true, before: false }],
|
|
161
|
+
'sort-keys': 'error',
|
|
162
|
+
'sort-keys-fix/sort-keys-fix': 'warn',
|
|
163
|
+
'space-before-blocks': ['error', 'always'],
|
|
164
|
+
'space-before-function-paren': [
|
|
165
|
+
'error',
|
|
166
|
+
{
|
|
167
|
+
anonymous: 'never',
|
|
168
|
+
asyncArrow: 'always',
|
|
169
|
+
named: 'never',
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
'space-in-parens': ['error', 'never'],
|
|
173
|
+
'space-infix-ops': 'error',
|
|
174
|
+
'space-unary-ops': ['error', { nonwords: false, words: true }],
|
|
175
|
+
'spaced-comment': ['error', 'always', { line: { exceptions: ['-'] } }],
|
|
176
|
+
'template-curly-spacing': ['error', 'never'],
|
|
177
|
+
yoda: ['error', 'never'],
|
|
178
|
+
},
|
|
179
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eslint-config-dolmios",
|
|
3
|
+
"description": "My personal ESLint configuration preferences.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": "Jackson Dolman <mail@dolmios.com>",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/dolmios/eslint-config-dolmios/issues"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "eslint --ext .js"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/dolmios/eslint-config-dolmios#readme",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"es2015",
|
|
15
|
+
"es2016",
|
|
16
|
+
"es2017",
|
|
17
|
+
"es2018",
|
|
18
|
+
"es6",
|
|
19
|
+
"jsx",
|
|
20
|
+
"lint",
|
|
21
|
+
"next",
|
|
22
|
+
"react",
|
|
23
|
+
"style guide"
|
|
24
|
+
],
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"main": "index.js",
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"eslint": ">= 8.0.0",
|
|
29
|
+
"prettier": ">= 2.0.0"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
|
33
|
+
"@typescript-eslint/parser": "^5.19.0",
|
|
34
|
+
"eslint": "^8.13.0",
|
|
35
|
+
"eslint-config-next": "12.1.5",
|
|
36
|
+
"eslint-config-prettier": "^8.5.0",
|
|
37
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
38
|
+
"eslint-plugin-react": "^7.29.4",
|
|
39
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
40
|
+
"prettier": "^2.6.2"
|
|
41
|
+
},
|
|
42
|
+
"private": false,
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/dolmios/eslint-config-dolmios.git"
|
|
46
|
+
}
|
|
47
|
+
}
|