@switz/eslint-config 12.0.4 → 12.0.6
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/eslint.config.mjs +23 -0
- package/examples/example.mdx +5 -1
- package/examples/example.tsx +1 -0
- package/mdx.mjs +9 -7
- package/package.json +1 -1
- package/react.mjs +6 -1
- package/prettier.config.js +0 -8
package/eslint.config.mjs
CHANGED
|
@@ -30,4 +30,27 @@ export default [
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
prettierPlugin,
|
|
33
|
+
{
|
|
34
|
+
rules: {
|
|
35
|
+
'prettier/prettier': [
|
|
36
|
+
'error',
|
|
37
|
+
{
|
|
38
|
+
singleQuote: true,
|
|
39
|
+
trailingComma: 'es5',
|
|
40
|
+
printWidth: 100,
|
|
41
|
+
quoteProps: 'consistent',
|
|
42
|
+
endOfLine: 'auto',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
33
47
|
];
|
|
48
|
+
|
|
49
|
+
// export default {
|
|
50
|
+
// plugins: ['prettier-plugin-tailwindcss'],
|
|
51
|
+
// singleQuote: true,
|
|
52
|
+
// trailingComma: 'es5',
|
|
53
|
+
// printWidth: 100,
|
|
54
|
+
// quoteProps: 'consistent',
|
|
55
|
+
// endOfLine: 'auto',
|
|
56
|
+
// };
|
package/examples/example.mdx
CHANGED
package/examples/example.tsx
CHANGED
package/mdx.mjs
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
import main from './eslint.config.mjs';
|
|
1
2
|
import * as mdx from 'eslint-plugin-mdx';
|
|
2
3
|
|
|
3
4
|
export default [
|
|
4
|
-
|
|
5
|
+
...main,
|
|
5
6
|
{
|
|
6
7
|
...mdx.flat,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
//
|
|
8
|
+
// files: ['**/*.mdx'],
|
|
9
|
+
// languageOptions: {
|
|
10
|
+
// // parserOptions: {
|
|
11
|
+
// // markdownExtensions: ['mdx', 'md'],
|
|
12
|
+
// // },
|
|
13
|
+
// },
|
|
14
|
+
// // optional, if you want to lint code blocks at the same
|
|
13
15
|
processor: mdx.createRemarkProcessor({
|
|
14
16
|
lintCodeBlocks: true,
|
|
15
17
|
// optional, if you want to disable language mapper, set it to `false`
|
package/package.json
CHANGED
package/react.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import main from './eslint.config.mjs';
|
|
2
1
|
import react from 'eslint-plugin-react';
|
|
2
|
+
import main from './eslint.config.mjs';
|
|
3
3
|
|
|
4
4
|
export default [
|
|
5
5
|
...main,
|
|
@@ -9,5 +9,10 @@ export default [
|
|
|
9
9
|
rules: {
|
|
10
10
|
'react/display-name': 'off',
|
|
11
11
|
},
|
|
12
|
+
settings: {
|
|
13
|
+
react: {
|
|
14
|
+
version: 'detect',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
12
17
|
},
|
|
13
18
|
];
|