@switz/eslint-config 12.4.0 → 12.5.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/eslint.config.mjs CHANGED
@@ -1,23 +1,14 @@
1
+ // @ts-check
2
+
1
3
  import js from '@eslint/js';
2
4
  import prettierPlugin from 'eslint-plugin-prettier/recommended';
3
5
  import globals from 'globals';
4
6
 
5
7
  import tseslint from 'typescript-eslint';
6
8
 
7
- // export default (main, tseslint.configs.recommended, {
8
- // rules: {
9
- // 'indent': 'off',
10
- // 'no-unused-vars': 'off',
11
- // '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
12
- // '@typescript-eslint/indent': 'off',
13
- // '@typescript-eslint/explicit-function-return-type': 'off',
14
- // '@typescript-eslint/camelcase': 'off',
15
- // '@typescript-eslint/no-use-before-define': ['error', { variables: false }],
16
- // '@typescript-eslint/no-empty-function': 'off',
17
- // },
18
- // });
19
-
20
- /** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigFile} */
9
+ /**
10
+ * @type {import("eslint").Linter.Config[]}
11
+ * */
21
12
  export default [
22
13
  {
23
14
  languageOptions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@switz/eslint-config",
3
- "version": "12.4.0",
3
+ "version": "12.5.0",
4
4
  "description": "",
5
5
  "main": "eslint.config.mjs",
6
6
  "type": "module",
@@ -15,18 +15,17 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@eslint/js": "^10.0.1",
18
- "@typescript-eslint/parser": "^8.54.0",
18
+ "@typescript-eslint/parser": "^8.56.0",
19
19
  "eslint-config-prettier": "^10.1.8",
20
+ "eslint-plugin-better-tailwindcss": "^4.3.0",
20
21
  "eslint-plugin-mdx": "^3.6.2",
21
22
  "eslint-plugin-prettier": "^5.5.5",
22
23
  "eslint-plugin-react": "^7.34.2",
23
- "eslint-plugin-readable-tailwind": "^3.0.0",
24
24
  "globals": "^17.3.0",
25
25
  "prettier": "3.8.1",
26
- "tailwindcss": "^4.1.18",
27
- "typescript-eslint": "^8.54.0"
26
+ "typescript-eslint": "^8.56.0"
28
27
  },
29
28
  "devDependencies": {
30
- "eslint": "^10.0.0"
29
+ "eslint": "^10.0.1"
31
30
  }
32
31
  }
package/tailwind.mjs CHANGED
@@ -1,17 +1,20 @@
1
- import eslintPluginReadableTailwind from 'eslint-plugin-readable-tailwind';
2
-
1
+ import eslintPluginBetterTailwindcss from 'eslint-plugin-better-tailwindcss';
3
2
  export default [
4
3
  {
5
- plugins: {
6
- 'readable-tailwind': eslintPluginReadableTailwind,
7
- },
4
+ // enable all recommended rules
5
+ extends: [eslintPluginBetterTailwindcss.configs.recommended],
6
+
7
+ // if needed, override rules to configure them individually
8
8
  rules: {
9
- // enable all recommended rules to warn
10
- ...eslintPluginReadableTailwind.configs.warning.rules,
11
- // enable all recommended rules to error
12
- ...eslintPluginReadableTailwind.configs.error.rules,
13
- // disabled because this conflicts with prettier. not worth the headache
14
- 'readable-tailwind/multiline': ['off'],
9
+ 'better-tailwindcss/enforce-consistent-line-wrapping': ['warn', { printWidth: 100 }],
10
+ // 'better-tailwindcss/enforce-shorthand-classes': ['error'],
11
+ },
12
+
13
+ settings: {
14
+ 'better-tailwindcss': {
15
+ // tailwindcss 4: the path to the entry file of the css based tailwind config (eg: `src/global.css`)
16
+ entryPoint: 'src/styles/global.css',
17
+ },
15
18
  },
16
19
  },
17
20
  ];