mikey-pro 5.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/LICENSE +21 -0
- package/README.md +100 -0
- package/eslint-config/index.js +441 -0
- package/package.json +65 -0
- package/prettier-config/index.js +15 -0
- package/stylelint-config/index.js +16 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Mikl Wolfe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<div width="100%" align="center">
|
|
2
|
+
<h1>
|
|
3
|
+
<b>Mikey Pro</b>
|
|
4
|
+
</h1>
|
|
5
|
+
<h3>
|
|
6
|
+
<a href="https://github.com/mikey-pro/style-guide">Style Guide</a>
|
|
7
|
+
+
|
|
8
|
+
<a href="https://github.com/mikey-pro/theme">Theme</a>
|
|
9
|
+
</h3>
|
|
10
|
+
<a href="https://github.com/mikey-pro">
|
|
11
|
+
<img src="img/mikey-pro-logo.svg" style="height: 75px" alt="Mikey Pro Logo" />
|
|
12
|
+
</a>
|
|
13
|
+
<br />
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
## **@mikey-pro/style-guide**
|
|
17
|
+
|
|
18
|
+
### Lint and Format Code (the way Mikey likes it)
|
|
19
|
+
|
|
20
|
+
_A curated compilation of packages, plugins, style guides, custom configurations
|
|
21
|
+
and modified rules for consistently writing top shelf code_
|
|
22
|
+
|
|
23
|
+
<table>
|
|
24
|
+
<thead>
|
|
25
|
+
<tr>
|
|
26
|
+
<th align="left">Compatibility</a></th>
|
|
27
|
+
</tr>
|
|
28
|
+
</thead>
|
|
29
|
+
<tbody>
|
|
30
|
+
<tr>
|
|
31
|
+
<td valign="top">
|
|
32
|
+
TypeScript -
|
|
33
|
+
JavaScript -
|
|
34
|
+
React -
|
|
35
|
+
Preact -
|
|
36
|
+
Vue -
|
|
37
|
+
Svelte-
|
|
38
|
+
JSX -
|
|
39
|
+
HTML -
|
|
40
|
+
CSS -
|
|
41
|
+
SCSS -
|
|
42
|
+
LESS -
|
|
43
|
+
JSON -
|
|
44
|
+
JSONC -
|
|
45
|
+
JSON5 -
|
|
46
|
+
Markdown
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
</tbody>
|
|
50
|
+
</table>
|
|
51
|
+
|
|
52
|
+
## Requirements
|
|
53
|
+
|
|
54
|
+
Install extensions:
|
|
55
|
+
<a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint">ESLint</a>
|
|
56
|
+
|
|
|
57
|
+
<a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">Prettier</a>
|
|
58
|
+
|
|
|
59
|
+
<a href="https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint">Stylelint</a>
|
|
60
|
+
|
|
61
|
+
Additional support:
|
|
62
|
+
<a href="https://marketplace.visualstudio.com/items?itemName=octref.vetur">Vetur</a>
|
|
63
|
+
|
|
|
64
|
+
<a href="https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode">Svelte</a>
|
|
65
|
+
|
|
66
|
+
Add
|
|
67
|
+
<a href="https://github.com/mikey-pro/style-guide/blob/main/vscode-settings.json">these
|
|
68
|
+
preferences</a> to `settings.json`
|
|
69
|
+
|
|
70
|
+
## Usage
|
|
71
|
+
|
|
72
|
+
### Install
|
|
73
|
+
|
|
74
|
+
```shell
|
|
75
|
+
npm i -D @mikey-pro/style-guide eslint prettier stylelint
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Configure
|
|
79
|
+
|
|
80
|
+
Add bundled configs to `package.json` and then reload
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"prettier": "@mikey-pro/prettier-config",
|
|
85
|
+
"eslintConfig": {
|
|
86
|
+
"extends": "@mikey-pro/eslint-config"
|
|
87
|
+
},
|
|
88
|
+
"stylelint": {
|
|
89
|
+
"extends": "@mikey-pro/stylelint-config"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Resources
|
|
95
|
+
|
|
96
|
+
[@mikey-pro/eslint-config](https://github.com/mikey-pro/eslint-config)
|
|
97
|
+
|
|
98
|
+
[@mikey-pro/prettier-config](https://github.com/mikey-pro/prettier-config)
|
|
99
|
+
|
|
100
|
+
[@mikey-pro/stylelint-config](https://github.com/mikey-pro/stylelint-config)
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
commonjs: true,
|
|
5
|
+
es2021: true,
|
|
6
|
+
es6: true,
|
|
7
|
+
node: true,
|
|
8
|
+
},
|
|
9
|
+
extends: [
|
|
10
|
+
'eslint:recommended',
|
|
11
|
+
'react-app',
|
|
12
|
+
'react-app/jest',
|
|
13
|
+
'plugin:unicorn/all',
|
|
14
|
+
'plugin:sonarjs/recommended',
|
|
15
|
+
'plugin:compat/recommended',
|
|
16
|
+
'plugin:css-modules/recommended',
|
|
17
|
+
'plugin:prettier/recommended',
|
|
18
|
+
],
|
|
19
|
+
ignorePatterns: [
|
|
20
|
+
'!.*',
|
|
21
|
+
'node_modules',
|
|
22
|
+
'vendor',
|
|
23
|
+
'dist',
|
|
24
|
+
'package-lock.json',
|
|
25
|
+
'LICENSE',
|
|
26
|
+
'.vscode',
|
|
27
|
+
'.github',
|
|
28
|
+
'tsconfig.json',
|
|
29
|
+
],
|
|
30
|
+
overrides: [
|
|
31
|
+
{
|
|
32
|
+
extends: [
|
|
33
|
+
'plugin:@typescript-eslint/recommended',
|
|
34
|
+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
35
|
+
],
|
|
36
|
+
files: ['*.ts', '*.tsx'],
|
|
37
|
+
parser: '@typescript-eslint/parser',
|
|
38
|
+
parserOptions: {
|
|
39
|
+
ecmaFeatures: {
|
|
40
|
+
jsx: true,
|
|
41
|
+
},
|
|
42
|
+
ecmaVersion: 'latest',
|
|
43
|
+
extraFileExtensions: ['.vue', '.svelte'],
|
|
44
|
+
project: ['../../../tsconfig.json'],
|
|
45
|
+
sourceType: 'module',
|
|
46
|
+
tsconfigRootDir: __dirname,
|
|
47
|
+
},
|
|
48
|
+
plugins: ['@typescript-eslint'],
|
|
49
|
+
rules: {
|
|
50
|
+
'@typescript-eslint/naming-convention': 0,
|
|
51
|
+
'import/default': 0,
|
|
52
|
+
'import/named': 0,
|
|
53
|
+
'import/namespace': 0,
|
|
54
|
+
'import/no-named-as-default-member': 0,
|
|
55
|
+
'import/no-unresolved': 0,
|
|
56
|
+
'prettier/prettier': [1, { parser: 'typescript' }],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
files: ['*.css'],
|
|
61
|
+
rules: {
|
|
62
|
+
'prettier/prettier': [1, { parser: 'css' }],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
files: ['*.scss'],
|
|
67
|
+
rules: {
|
|
68
|
+
'prettier/prettier': [1, { parser: 'scss' }],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
files: ['*.less'],
|
|
73
|
+
rules: {
|
|
74
|
+
'prettier/prettier': [1, { parser: 'less' }],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
extends: ['plugin:yaml/recommended'],
|
|
79
|
+
files: ['*.yaml', '*.yml'],
|
|
80
|
+
plugins: ['yaml'],
|
|
81
|
+
rules: {
|
|
82
|
+
'prettier/prettier': [1, { parser: 'yaml' }],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
extends: ['plugin:toml/standard'],
|
|
87
|
+
files: ['*.toml'],
|
|
88
|
+
parser: 'toml-eslint-parser',
|
|
89
|
+
rules: {
|
|
90
|
+
'prettier/prettier': 0,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
files: ['*.md'],
|
|
95
|
+
extends: ['plugin:markdownlint/recommended'],
|
|
96
|
+
parser: 'eslint-plugin-markdownlint/parser',
|
|
97
|
+
rules: {
|
|
98
|
+
'prettier/prettier': [1, { parser: 'markdown' }],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
files: ['*.md.json'],
|
|
103
|
+
rules: {
|
|
104
|
+
'prettier/prettier': [1, { parser: 'json' }],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
extends: ['plugin:@html-eslint/recommended'],
|
|
109
|
+
files: ['*.html'],
|
|
110
|
+
parser: '@html-eslint/parser',
|
|
111
|
+
plugins: ['@html-eslint'],
|
|
112
|
+
rules: {
|
|
113
|
+
'@html-eslint/indent': 0,
|
|
114
|
+
'@html-eslint/no-extra-spacing-attrs': 0,
|
|
115
|
+
'@html-eslint/require-closing-tags': 0,
|
|
116
|
+
'disable-autofix/@html-eslint/require-closing-tags': [
|
|
117
|
+
1,
|
|
118
|
+
{ selfClosing: 'always' },
|
|
119
|
+
],
|
|
120
|
+
'spaced-comment': 0,
|
|
121
|
+
'prettier/prettier': [1, { parser: 'html' }],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
extends: ['plugin:vue/vue3-recommended'],
|
|
126
|
+
files: ['*.vue'],
|
|
127
|
+
parser: 'vue-eslint-parser',
|
|
128
|
+
parserOptions: {
|
|
129
|
+
babelOptions: {
|
|
130
|
+
plugins: [
|
|
131
|
+
'eslint-plugin-vue',
|
|
132
|
+
[
|
|
133
|
+
'@babel/plugin-transform-react-jsx',
|
|
134
|
+
{
|
|
135
|
+
pragma: 'h',
|
|
136
|
+
pragmaFrag: 'Fragment',
|
|
137
|
+
runtime: 'automatic',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
],
|
|
141
|
+
presets: [
|
|
142
|
+
[
|
|
143
|
+
'@babel/preset-env',
|
|
144
|
+
{
|
|
145
|
+
targets: {
|
|
146
|
+
node: 'current',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
ecmaVersion: 'latest',
|
|
153
|
+
requireConfigFile: false,
|
|
154
|
+
sourceType: 'module',
|
|
155
|
+
},
|
|
156
|
+
rules: {
|
|
157
|
+
'prettier/prettier': 1,
|
|
158
|
+
'vue/component-tags-order': [
|
|
159
|
+
1,
|
|
160
|
+
{
|
|
161
|
+
order: [['script', 'template'], 'style'],
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
'vue/html-self-closing': [
|
|
165
|
+
1,
|
|
166
|
+
{
|
|
167
|
+
html: {
|
|
168
|
+
component: 'always',
|
|
169
|
+
normal: 'always',
|
|
170
|
+
void: 'always',
|
|
171
|
+
},
|
|
172
|
+
math: 'always',
|
|
173
|
+
svg: 'always',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
files: ['*.svelte'],
|
|
180
|
+
plugins: ['svelte3'],
|
|
181
|
+
processor: 'svelte3/svelte3',
|
|
182
|
+
rules: {
|
|
183
|
+
'import/first': 0,
|
|
184
|
+
'import/no-duplicates': 0,
|
|
185
|
+
'import/no-mutable-exports': 0,
|
|
186
|
+
'import/no-unresolved': 0,
|
|
187
|
+
'prettier/prettier': 0,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
extends: ['plugin:jsonc/recommended-with-jsonc'],
|
|
192
|
+
files: ['*.json', '*.jsonc', '*rc'],
|
|
193
|
+
parser: 'jsonc-eslint-parser',
|
|
194
|
+
rules: {
|
|
195
|
+
'prettier/prettier': [1, { parser: 'json' }],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
extends: ['plugin:jsonc/recommended-with-json5'],
|
|
200
|
+
files: ['*.json5'],
|
|
201
|
+
parser: 'jsonc-eslint-parser',
|
|
202
|
+
rules: {
|
|
203
|
+
'prettier/prettier': [1, { parser: 'json5' }],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
parser: '@babel/eslint-parser',
|
|
208
|
+
parserOptions: {
|
|
209
|
+
babelOptions: {
|
|
210
|
+
presets: [
|
|
211
|
+
[
|
|
212
|
+
'@babel/preset-env',
|
|
213
|
+
{
|
|
214
|
+
targets: {
|
|
215
|
+
node: 'current',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
'@babel/preset-react',
|
|
221
|
+
{
|
|
222
|
+
runtime: 'automatic',
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
ecmaVersion: 'latest',
|
|
228
|
+
requireConfigFile: false,
|
|
229
|
+
sourceType: 'module',
|
|
230
|
+
},
|
|
231
|
+
plugins: [
|
|
232
|
+
'prettier',
|
|
233
|
+
'css-modules',
|
|
234
|
+
'disable-autofix',
|
|
235
|
+
'@babel',
|
|
236
|
+
'unicorn',
|
|
237
|
+
'sonarjs',
|
|
238
|
+
'only-warn',
|
|
239
|
+
],
|
|
240
|
+
root: true,
|
|
241
|
+
rules: {
|
|
242
|
+
camelcase: 1,
|
|
243
|
+
'class-methods-use-this': 0,
|
|
244
|
+
'constructor-super': 1,
|
|
245
|
+
'dot-notation': 1,
|
|
246
|
+
'func-names': 0,
|
|
247
|
+
'import/extensions': [1, 'never', { ignorePackages: true }],
|
|
248
|
+
'import/no-commonjs': 0,
|
|
249
|
+
'import/no-unresolved': [
|
|
250
|
+
1,
|
|
251
|
+
{ amd: true, commonjs: true, ignore: ['^node:'] },
|
|
252
|
+
],
|
|
253
|
+
'import/order': [
|
|
254
|
+
1,
|
|
255
|
+
{
|
|
256
|
+
alphabetize: {
|
|
257
|
+
order: 'asc',
|
|
258
|
+
},
|
|
259
|
+
'newlines-between': 'always',
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
'jsx-quotes': 1,
|
|
263
|
+
'keyword-spacing': 1,
|
|
264
|
+
'no-caller': 1,
|
|
265
|
+
'no-confusing-arrow': 1,
|
|
266
|
+
'no-console': 0,
|
|
267
|
+
'no-const-assign': 1,
|
|
268
|
+
'no-delete-var': 1,
|
|
269
|
+
'no-dupe-class-members': 1,
|
|
270
|
+
'no-dupe-keys': 1,
|
|
271
|
+
'no-duplicate-imports': 1,
|
|
272
|
+
'no-else-return': 1,
|
|
273
|
+
'no-empty': 0,
|
|
274
|
+
'no-empty-pattern': 0,
|
|
275
|
+
'no-extra-parens': 0,
|
|
276
|
+
'no-extra-bind': 1,
|
|
277
|
+
'no-extra-semi': 1,
|
|
278
|
+
'no-floating-decimal': 1,
|
|
279
|
+
'no-iterator': 1,
|
|
280
|
+
'no-lonely-if': 1,
|
|
281
|
+
'no-mixed-spaces-and-tabs': [1, 'smart-tabs'],
|
|
282
|
+
'no-multi-str': 1,
|
|
283
|
+
'no-new-wrappers': 1,
|
|
284
|
+
'no-process-exit': 0,
|
|
285
|
+
'no-proto': 1,
|
|
286
|
+
'no-redeclare': 1,
|
|
287
|
+
'no-restricted-syntax': [
|
|
288
|
+
1,
|
|
289
|
+
{
|
|
290
|
+
message:
|
|
291
|
+
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
|
|
292
|
+
selector: 'ForInStatement',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
message:
|
|
296
|
+
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
|
|
297
|
+
selector: 'LabeledStatement',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
message:
|
|
301
|
+
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
|
302
|
+
selector: 'WithStatement',
|
|
303
|
+
},
|
|
304
|
+
],
|
|
305
|
+
'no-shadow': 0,
|
|
306
|
+
'no-shadow-restricted-names': 1,
|
|
307
|
+
'no-spaced-func': 1,
|
|
308
|
+
'no-this-before-super': 1,
|
|
309
|
+
'no-undef-init': 1,
|
|
310
|
+
'no-underscore-dangle': 0,
|
|
311
|
+
'no-unneeded-ternary': 1,
|
|
312
|
+
'no-unused-vars': [
|
|
313
|
+
1,
|
|
314
|
+
{
|
|
315
|
+
args: 'after-used',
|
|
316
|
+
ignoreRestSiblings: true,
|
|
317
|
+
},
|
|
318
|
+
],
|
|
319
|
+
'no-useless-call': 1,
|
|
320
|
+
'no-useless-computed-key': 1,
|
|
321
|
+
'no-useless-concat': 1,
|
|
322
|
+
'no-useless-constructor': 1,
|
|
323
|
+
'no-useless-escape': 1,
|
|
324
|
+
'no-useless-rename': 1,
|
|
325
|
+
'no-useless-return': 1,
|
|
326
|
+
'no-var': 1,
|
|
327
|
+
'no-with': 1,
|
|
328
|
+
'object-curly-spacing': [0, 'always'],
|
|
329
|
+
'object-shorthand': 1,
|
|
330
|
+
'prefer-arrow-callback': 1,
|
|
331
|
+
'prefer-destructuring': [
|
|
332
|
+
1,
|
|
333
|
+
{
|
|
334
|
+
array: false,
|
|
335
|
+
object: true,
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
'prefer-rest-params': 1,
|
|
339
|
+
'prefer-spread': 1,
|
|
340
|
+
'prefer-template': 1,
|
|
341
|
+
'prettier/prettier': [1, { parser: 'babel' }],
|
|
342
|
+
'quote-props': [1, 'as-needed'],
|
|
343
|
+
quotes: [
|
|
344
|
+
0,
|
|
345
|
+
'single',
|
|
346
|
+
{
|
|
347
|
+
allowTemplateLiterals: true,
|
|
348
|
+
avoidEscape: true,
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
radix: 1,
|
|
352
|
+
'react-hooks/exhaustive-deps': 1,
|
|
353
|
+
'react-hooks/rules-of-hooks': 1,
|
|
354
|
+
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
355
|
+
'react/function-component-definition': [
|
|
356
|
+
0,
|
|
357
|
+
{ namedComponents: 'arrow-function' },
|
|
358
|
+
],
|
|
359
|
+
'react/jsx-curly-spacing': 1,
|
|
360
|
+
'react/jsx-key': [1, { checkFragmentShorthand: true }],
|
|
361
|
+
'react/jsx-no-bind': [
|
|
362
|
+
1,
|
|
363
|
+
{
|
|
364
|
+
allowArrowFunctions: true,
|
|
365
|
+
allowFunctions: true,
|
|
366
|
+
ignoreRefs: true,
|
|
367
|
+
},
|
|
368
|
+
],
|
|
369
|
+
'react/jsx-no-comment-textnodes': 1,
|
|
370
|
+
'react/jsx-no-duplicate-props': 1,
|
|
371
|
+
'react/jsx-no-target-blank': 1,
|
|
372
|
+
'react/jsx-no-undef': 1,
|
|
373
|
+
'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
|
|
374
|
+
'react/jsx-uses-vars': 1,
|
|
375
|
+
'react/no-danger': 1,
|
|
376
|
+
'react/no-deprecated': 1,
|
|
377
|
+
'react/no-did-mount-set-state': 1,
|
|
378
|
+
'react/no-did-update-set-state': 1,
|
|
379
|
+
'react/no-find-dom-node': 1,
|
|
380
|
+
'react/no-is-mounted': 1,
|
|
381
|
+
'react/no-string-refs': 1,
|
|
382
|
+
'filenames/match-regex': 0,
|
|
383
|
+
'react/prefer-es6-class': 1,
|
|
384
|
+
'react/prefer-stateless-function': 1,
|
|
385
|
+
'react/require-render-return': 1,
|
|
386
|
+
'react/self-closing-comp': [
|
|
387
|
+
'error',
|
|
388
|
+
{
|
|
389
|
+
component: true,
|
|
390
|
+
html: false,
|
|
391
|
+
},
|
|
392
|
+
],
|
|
393
|
+
'react/state-in-constructor': 0,
|
|
394
|
+
'require-atomic-updates': 0,
|
|
395
|
+
'sort-imports': 0,
|
|
396
|
+
'rest-spread-spacing': 0,
|
|
397
|
+
semi: 0,
|
|
398
|
+
'sort-vars': 1,
|
|
399
|
+
'space-before-function-paren': [
|
|
400
|
+
0,
|
|
401
|
+
{ anonymous: 'always', asyncArrow: 'always', named: 'never' },
|
|
402
|
+
],
|
|
403
|
+
'space-in-parens': [0, 'never'],
|
|
404
|
+
'spaced-comment': [
|
|
405
|
+
1,
|
|
406
|
+
'always',
|
|
407
|
+
{
|
|
408
|
+
block: {
|
|
409
|
+
balanced: true,
|
|
410
|
+
exceptions: ['*'],
|
|
411
|
+
markers: ['!'],
|
|
412
|
+
},
|
|
413
|
+
line: {
|
|
414
|
+
exceptions: ['-', '+'],
|
|
415
|
+
markers: ['/'],
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
strict: [1, 'never'],
|
|
420
|
+
'unicode-bom': 1,
|
|
421
|
+
'unicorn/filename-case': [
|
|
422
|
+
1,
|
|
423
|
+
{
|
|
424
|
+
cases: {
|
|
425
|
+
camelCase: true,
|
|
426
|
+
pascalCase: true,
|
|
427
|
+
},
|
|
428
|
+
ignore: ['README.md'],
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
'unicorn/import-index': [1, { ignoreImports: true }],
|
|
432
|
+
'valid-jsdoc': 0,
|
|
433
|
+
},
|
|
434
|
+
settings: {
|
|
435
|
+
'json/sort-package-json': 'pro',
|
|
436
|
+
polyfills: ['Promise'],
|
|
437
|
+
react: {
|
|
438
|
+
version: 'detect',
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mikey-pro",
|
|
3
|
+
"version": "5.0.0",
|
|
4
|
+
"description": "Mikey Pro Style Guide",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@babel/core": "^7.20.5",
|
|
7
|
+
"@babel/eslint-parser": "^7.19",
|
|
8
|
+
"@babel/eslint-plugin": "^7.19",
|
|
9
|
+
"@babel/plugin-transform-react-jsx": "^7.19.0",
|
|
10
|
+
"@babel/preset-env": "^7.20",
|
|
11
|
+
"@html-eslint/eslint-plugin": "^0.15.0",
|
|
12
|
+
"@html-eslint/parser": "^0.15.0",
|
|
13
|
+
"@typescript-eslint/eslint-plugin": "^5.46.0",
|
|
14
|
+
"@typescript-eslint/parser": "^5.46.0",
|
|
15
|
+
"@vue/babel-plugin-jsx": "^1.1.1",
|
|
16
|
+
"eslint-config-prettier": "^8.5",
|
|
17
|
+
"eslint-config-react-app": "^7.0.1",
|
|
18
|
+
"eslint-import-resolver-typescript": "^3.5.2",
|
|
19
|
+
"eslint-plugin-compat": "^4.0",
|
|
20
|
+
"eslint-plugin-css-modules": "^2.11",
|
|
21
|
+
"eslint-plugin-disable-autofix": "^3.0.0",
|
|
22
|
+
"eslint-plugin-jsonc": "^2.5.0",
|
|
23
|
+
"eslint-plugin-markdownlint": "^0.4.0",
|
|
24
|
+
"eslint-plugin-n": "^15.6.0",
|
|
25
|
+
"eslint-plugin-only-warn": "^1.1.0",
|
|
26
|
+
"eslint-plugin-prettier": "^4.2",
|
|
27
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
28
|
+
"eslint-plugin-sonarjs": "^0.17.0",
|
|
29
|
+
"eslint-plugin-svelte3": "^4.0.0",
|
|
30
|
+
"eslint-plugin-toml": "^0.3.1",
|
|
31
|
+
"eslint-plugin-unicorn": "^45.0.1",
|
|
32
|
+
"eslint-plugin-vue": "^9.8",
|
|
33
|
+
"eslint-plugin-yaml": "^0.5.0",
|
|
34
|
+
"vue-eslint-parser": "^9.1"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"eslint-config/",
|
|
38
|
+
"prettier-config/",
|
|
39
|
+
"stylelint-config/",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/mikey-pro/style-guide.git"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/mikey-pro/style-guide#readme",
|
|
49
|
+
"author": "Mikl Wolfe <wolfe@mikl.io> (https://mikl.io)",
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/mikey-pro/style-guide/issues"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"mikey-pro",
|
|
55
|
+
"mikey",
|
|
56
|
+
"pro",
|
|
57
|
+
"style-guide",
|
|
58
|
+
"styleguide",
|
|
59
|
+
"style",
|
|
60
|
+
"guide"
|
|
61
|
+
],
|
|
62
|
+
"contributors": [
|
|
63
|
+
"Mikl Wolfe <wolfe@mikl.io> (https://mikl.io)"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
tabWidth: 2,
|
|
3
|
+
useTabs: false,
|
|
4
|
+
printWidth: 80,
|
|
5
|
+
singleQuote: true,
|
|
6
|
+
trailingComma: 'all',
|
|
7
|
+
bracketSpacing: true,
|
|
8
|
+
proseWrap: 'always',
|
|
9
|
+
svelteSortOrder: 'options-scripts-markup-styles',
|
|
10
|
+
svelteStrictMode: true,
|
|
11
|
+
svelteBracketNewLine: true,
|
|
12
|
+
svelteAllowShorthand: false,
|
|
13
|
+
svelteIndentScriptAndStyle: false,
|
|
14
|
+
vueIndentScriptAndStyle: false,
|
|
15
|
+
};
|