@switz/eslint-config 12.1.3 → 12.1.4

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/README.md CHANGED
@@ -26,21 +26,15 @@ import react from '@switz/eslint-config/react';
26
26
  export default [...react];
27
27
  ```
28
28
 
29
- Or typescript:
29
+ If you need mdx support, use
30
30
 
31
31
  ```
32
- import typescript from '@switz/eslint-config/typescript';
32
+ import mdx from '@switz/eslint-config/mdx';
33
33
 
34
- export default [...typescript];
34
+ export default [...mdx];
35
35
  ```
36
36
 
37
- Or tailwind:
38
-
39
- ```
40
- import tailwind from '@switz/eslint-config/tailwind';
41
-
42
- export default [...tailwind];
43
- ```
37
+ You should be able to combine configs just by spreading more into the array.
44
38
 
45
39
  ## Reference
46
40
 
package/eslint.config.mjs CHANGED
@@ -1,10 +1,31 @@
1
- import globals from 'globals';
2
1
  import js from '@eslint/js';
3
2
  import prettierPlugin from 'eslint-plugin-prettier/recommended';
3
+ import eslintPluginReadableTailwind from 'eslint-plugin-readable-tailwind';
4
+ import globals from 'globals';
5
+
6
+ import tseslint from 'typescript-eslint';
4
7
 
5
- export default [
8
+ // export default (main, tseslint.configs.recommended, {
9
+ // rules: {
10
+ // 'indent': 'off',
11
+ // 'no-unused-vars': 'off',
12
+ // '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
13
+ // '@typescript-eslint/indent': 'off',
14
+ // '@typescript-eslint/explicit-function-return-type': 'off',
15
+ // '@typescript-eslint/camelcase': 'off',
16
+ // '@typescript-eslint/no-use-before-define': ['error', { variables: false }],
17
+ // '@typescript-eslint/no-empty-function': 'off',
18
+ // },
19
+ // });
20
+
21
+ export default tseslint.config(
6
22
  {
7
23
  languageOptions: {
24
+ parserOptions: {
25
+ ecmaFeatures: {
26
+ jsx: true,
27
+ },
28
+ },
8
29
  globals: {
9
30
  ...globals.browser,
10
31
  ...globals.nodeBuiltin,
@@ -12,9 +33,18 @@ export default [
12
33
  },
13
34
  },
14
35
  js.configs.recommended,
36
+ tseslint.configs.recommended,
15
37
  {
16
38
  files: ['**/*.{js,jsx,ts,tsx}'],
39
+ plugins: {
40
+ 'readable-tailwind': eslintPluginReadableTailwind,
41
+ },
17
42
  rules: {
43
+ // enable all recommended rules to warn
44
+ ...eslintPluginReadableTailwind.configs.warning.rules,
45
+ // enable all recommended rules to error
46
+ ...eslintPluginReadableTailwind.configs.error.rules,
47
+ 'readable-tailwind/multiline': ['off'],
18
48
  'max-len': [
19
49
  'error',
20
50
  {
@@ -44,6 +74,7 @@ export default [
44
74
  'prettier/prettier': [
45
75
  'error',
46
76
  {
77
+ // plugins: ['prettier-plugin-tailwindcss'],
47
78
  singleQuote: true,
48
79
  trailingComma: 'es5',
49
80
  printWidth: 100,
@@ -52,14 +83,5 @@ export default [
52
83
  },
53
84
  ],
54
85
  },
55
- },
56
- ];
57
-
58
- // export default {
59
- // plugins: ['prettier-plugin-tailwindcss'],
60
- // singleQuote: true,
61
- // trailingComma: 'es5',
62
- // printWidth: 100,
63
- // quoteProps: 'consistent',
64
- // endOfLine: 'auto',
65
- // };
86
+ }
87
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@switz/eslint-config",
3
- "version": "12.1.3",
3
+ "version": "12.1.4",
4
4
  "description": "",
5
5
  "main": "eslint.config.mjs",
6
6
  "type": "module",
@@ -15,17 +15,18 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@eslint/js": "^9.24.0",
18
+ "@typescript-eslint/parser": "^8.29.1",
18
19
  "eslint-config-prettier": "^10.1.1",
19
20
  "eslint-plugin-mdx": "^3.1.5",
20
21
  "eslint-plugin-prettier": "^5.1.3",
21
22
  "eslint-plugin-react": "^7.34.2",
22
- "eslint-plugin-tailwindcss": "4.0.0-alpha.0",
23
23
  "globals": "^16.0.0",
24
24
  "prettier": "3.5.3",
25
- "prettier-plugin-tailwindcss": "^0.6.11",
25
+ "tailwindcss": "^4.1.3",
26
26
  "typescript-eslint": "^8.29.0"
27
27
  },
28
28
  "devDependencies": {
29
- "eslint": "^9.24.0"
29
+ "eslint": "^9.24.0",
30
+ "eslint-plugin-readable-tailwind": "^2.0.0"
30
31
  }
31
32
  }
package/react.mjs CHANGED
@@ -1,19 +1,19 @@
1
- import react from 'eslint-plugin-react';
2
- import main from './eslint.config.mjs';
1
+ import react from "eslint-plugin-react";
2
+ import main from "./eslint.config.mjs";
3
3
  // import tailwind from './tailwind.mjs';
4
4
 
5
5
  export default [
6
6
  react.configs.flat.recommended,
7
- react.configs.flat['jsx-runtime'],
7
+ react.configs.flat["jsx-runtime"],
8
8
  ...main,
9
9
  // ...tailwind,
10
10
  {
11
11
  rules: {
12
- 'react/display-name': 'off',
12
+ "react/display-name": "off",
13
13
  },
14
14
  settings: {
15
15
  react: {
16
- version: 'detect',
16
+ version: "detect",
17
17
  },
18
18
  },
19
19
  },
@@ -1,12 +0,0 @@
1
- # Hello!
2
-
3
- This is a test file
4
-
5
- <div>
6
- {[1, 2323]}
7
- test
8
- </div>
9
-
10
- ```js
11
- const hi = 2;
12
- ```
@@ -1,2 +0,0 @@
1
- export const foo = 34;
2
- export const quotes = 'hello';
package/typescript.mjs DELETED
@@ -1,15 +0,0 @@
1
- import main from './eslint.config.mjs';
2
- import tseslint from 'typescript-eslint';
3
-
4
- export default tseslint.config(main, tseslint.configs.recommended, {
5
- rules: {
6
- 'indent': 'off',
7
- 'no-unused-vars': 'off',
8
- '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
9
- '@typescript-eslint/indent': 'off',
10
- '@typescript-eslint/explicit-function-return-type': 'off',
11
- '@typescript-eslint/camelcase': 'off',
12
- '@typescript-eslint/no-use-before-define': ['error', { variables: false }],
13
- '@typescript-eslint/no-empty-function': 'off',
14
- },
15
- });