@will-stone/eslint-config 0.12.0 → 0.12.2

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.
Files changed (3) hide show
  1. package/dist/index.cjs +58 -38
  2. package/dist/index.js +57 -37
  3. package/package.json +18 -19
package/dist/index.cjs CHANGED
@@ -1014,6 +1014,26 @@ function switchCase() {
1014
1014
  ];
1015
1015
  }
1016
1016
 
1017
+ // src/configs/tailwind.ts
1018
+ var _eslintplugintailwindcss = require('eslint-plugin-tailwindcss'); var _eslintplugintailwindcss2 = _interopRequireDefault(_eslintplugintailwindcss);
1019
+ function tailwind() {
1020
+ return [
1021
+ {
1022
+ files: ["**/*.{jsx,tsx,astro}"],
1023
+ plugins: { tailwindcss: _eslintplugintailwindcss2.default },
1024
+ rules: {
1025
+ "tailwindcss/classnames-order": "warn",
1026
+ "tailwindcss/enforces-negative-arbitrary-values": "warn",
1027
+ "tailwindcss/enforces-shorthand": "warn",
1028
+ "tailwindcss/migration-from-tailwind-2": "off",
1029
+ "tailwindcss/no-arbitrary-value": "off",
1030
+ "tailwindcss/no-contradicting-classname": "warn",
1031
+ "tailwindcss/no-custom-classname": "error"
1032
+ }
1033
+ }
1034
+ ];
1035
+ }
1036
+
1017
1037
  // src/configs/typescript.ts
1018
1038
  var _eslintplugin = require('@typescript-eslint/eslint-plugin'); var _eslintplugin2 = _interopRequireDefault(_eslintplugin);
1019
1039
 
@@ -1110,53 +1130,53 @@ function typescript(options) {
1110
1130
  * These require type checking
1111
1131
  */
1112
1132
  ...tsconfigPath ? {
1113
- "@typescript-eslint/await-thenable": "error",
1133
+ "@typescript-eslint/await-thenable": "off",
1114
1134
  "@typescript-eslint/consistent-type-exports": "warn",
1115
1135
  "@typescript-eslint/dot-notation": "off",
1116
1136
  "@typescript-eslint/naming-convention": "off",
1117
1137
  "@typescript-eslint/no-base-to-string": "off",
1118
- "@typescript-eslint/no-confusing-void-expression": "warn",
1119
- "@typescript-eslint/no-duplicate-type-constituents": "warn",
1120
- "@typescript-eslint/no-floating-promises": "error",
1121
- "@typescript-eslint/no-for-in-array": "error",
1122
- "@typescript-eslint/no-implied-eval": "error",
1123
- "@typescript-eslint/no-meaningless-void-operator": "warn",
1124
- "@typescript-eslint/no-misused-promises": "error",
1125
- "@typescript-eslint/no-mixed-enums": "error",
1126
- "@typescript-eslint/no-redundant-type-constituents": "error",
1127
- "@typescript-eslint/no-throw-literal": "error",
1128
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
1129
- "@typescript-eslint/no-unnecessary-condition": "warn",
1130
- "@typescript-eslint/no-unnecessary-qualifier": "warn",
1131
- "@typescript-eslint/no-unnecessary-type-arguments": "warn",
1132
- "@typescript-eslint/no-unnecessary-type-assertion": "warn",
1133
- "@typescript-eslint/no-unsafe-argument": "error",
1134
- "@typescript-eslint/no-unsafe-assignment": "error",
1135
- "@typescript-eslint/no-unsafe-call": "error",
1136
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
1137
- "@typescript-eslint/no-unsafe-member-access": "error",
1138
+ "@typescript-eslint/no-confusing-void-expression": "off",
1139
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1140
+ "@typescript-eslint/no-floating-promises": "off",
1141
+ "@typescript-eslint/no-for-in-array": "off",
1142
+ "@typescript-eslint/no-implied-eval": "off",
1143
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1144
+ "@typescript-eslint/no-misused-promises": "off",
1145
+ "@typescript-eslint/no-mixed-enums": "off",
1146
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1147
+ "@typescript-eslint/no-throw-literal": "off",
1148
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1149
+ "@typescript-eslint/no-unnecessary-condition": "off",
1150
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1151
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1152
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1153
+ "@typescript-eslint/no-unsafe-argument": "off",
1154
+ "@typescript-eslint/no-unsafe-assignment": "off",
1155
+ "@typescript-eslint/no-unsafe-call": "off",
1156
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1157
+ "@typescript-eslint/no-unsafe-member-access": "off",
1138
1158
  "@typescript-eslint/no-unsafe-return": "off",
1139
- "@typescript-eslint/no-unsafe-unary-minus": "error",
1159
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1140
1160
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
1141
- "@typescript-eslint/prefer-destructuring": "warn",
1142
- "@typescript-eslint/prefer-includes": "warn",
1161
+ "@typescript-eslint/prefer-destructuring": "off",
1162
+ "@typescript-eslint/prefer-includes": "off",
1143
1163
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1144
1164
  "@typescript-eslint/prefer-optional-chain": "off",
1145
- "@typescript-eslint/prefer-readonly": "warn",
1165
+ "@typescript-eslint/prefer-readonly": "off",
1146
1166
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1147
- "@typescript-eslint/prefer-reduce-type-parameter": "warn",
1148
- "@typescript-eslint/prefer-regexp-exec": "warn",
1149
- "@typescript-eslint/prefer-return-this-type": "warn",
1167
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1168
+ "@typescript-eslint/prefer-regexp-exec": "off",
1169
+ "@typescript-eslint/prefer-return-this-type": "off",
1150
1170
  "@typescript-eslint/prefer-string-starts-ends-with": "off",
1151
- "@typescript-eslint/promise-function-async": "warn",
1152
- "@typescript-eslint/require-array-sort-compare": "error",
1153
- "@typescript-eslint/require-await": "error",
1154
- "@typescript-eslint/restrict-plus-operands": "error",
1155
- "@typescript-eslint/restrict-template-expressions": "error",
1156
- "@typescript-eslint/return-await": "warn",
1171
+ "@typescript-eslint/promise-function-async": "off",
1172
+ "@typescript-eslint/require-array-sort-compare": "off",
1173
+ "@typescript-eslint/require-await": "off",
1174
+ "@typescript-eslint/restrict-plus-operands": "off",
1175
+ "@typescript-eslint/restrict-template-expressions": "off",
1176
+ "@typescript-eslint/return-await": "off",
1157
1177
  "@typescript-eslint/strict-boolean-expressions": "off",
1158
- "@typescript-eslint/switch-exhaustiveness-check": "error",
1159
- "@typescript-eslint/unbound-method": "error"
1178
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1179
+ "@typescript-eslint/unbound-method": "off"
1160
1180
  } : {},
1161
1181
  /**
1162
1182
  * Off for Prettier
@@ -1510,7 +1530,7 @@ function factory(options) {
1510
1530
  configs.push(node());
1511
1531
  }
1512
1532
  if (isTailwind) {
1513
- configs.push(node());
1533
+ configs.push(tailwind());
1514
1534
  }
1515
1535
  if (testingFramework === "jest") {
1516
1536
  configs.push(jest());
@@ -1525,4 +1545,4 @@ function factory(options) {
1525
1545
 
1526
1546
  exports.default = factory;
1527
1547
 
1528
- module.exports = exports.default
1548
+ module.exports = exports.default;
package/dist/index.js CHANGED
@@ -1014,6 +1014,26 @@ function switchCase() {
1014
1014
  ];
1015
1015
  }
1016
1016
 
1017
+ // src/configs/tailwind.ts
1018
+ import pluginTailwind from "eslint-plugin-tailwindcss";
1019
+ function tailwind() {
1020
+ return [
1021
+ {
1022
+ files: ["**/*.{jsx,tsx,astro}"],
1023
+ plugins: { tailwindcss: pluginTailwind },
1024
+ rules: {
1025
+ "tailwindcss/classnames-order": "warn",
1026
+ "tailwindcss/enforces-negative-arbitrary-values": "warn",
1027
+ "tailwindcss/enforces-shorthand": "warn",
1028
+ "tailwindcss/migration-from-tailwind-2": "off",
1029
+ "tailwindcss/no-arbitrary-value": "off",
1030
+ "tailwindcss/no-contradicting-classname": "warn",
1031
+ "tailwindcss/no-custom-classname": "error"
1032
+ }
1033
+ }
1034
+ ];
1035
+ }
1036
+
1017
1037
  // src/configs/typescript.ts
1018
1038
  import pluginTypescript from "@typescript-eslint/eslint-plugin";
1019
1039
  import * as parserTypescript2 from "@typescript-eslint/parser";
@@ -1110,53 +1130,53 @@ function typescript(options) {
1110
1130
  * These require type checking
1111
1131
  */
1112
1132
  ...tsconfigPath ? {
1113
- "@typescript-eslint/await-thenable": "error",
1133
+ "@typescript-eslint/await-thenable": "off",
1114
1134
  "@typescript-eslint/consistent-type-exports": "warn",
1115
1135
  "@typescript-eslint/dot-notation": "off",
1116
1136
  "@typescript-eslint/naming-convention": "off",
1117
1137
  "@typescript-eslint/no-base-to-string": "off",
1118
- "@typescript-eslint/no-confusing-void-expression": "warn",
1119
- "@typescript-eslint/no-duplicate-type-constituents": "warn",
1120
- "@typescript-eslint/no-floating-promises": "error",
1121
- "@typescript-eslint/no-for-in-array": "error",
1122
- "@typescript-eslint/no-implied-eval": "error",
1123
- "@typescript-eslint/no-meaningless-void-operator": "warn",
1124
- "@typescript-eslint/no-misused-promises": "error",
1125
- "@typescript-eslint/no-mixed-enums": "error",
1126
- "@typescript-eslint/no-redundant-type-constituents": "error",
1127
- "@typescript-eslint/no-throw-literal": "error",
1128
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
1129
- "@typescript-eslint/no-unnecessary-condition": "warn",
1130
- "@typescript-eslint/no-unnecessary-qualifier": "warn",
1131
- "@typescript-eslint/no-unnecessary-type-arguments": "warn",
1132
- "@typescript-eslint/no-unnecessary-type-assertion": "warn",
1133
- "@typescript-eslint/no-unsafe-argument": "error",
1134
- "@typescript-eslint/no-unsafe-assignment": "error",
1135
- "@typescript-eslint/no-unsafe-call": "error",
1136
- "@typescript-eslint/no-unsafe-enum-comparison": "error",
1137
- "@typescript-eslint/no-unsafe-member-access": "error",
1138
+ "@typescript-eslint/no-confusing-void-expression": "off",
1139
+ "@typescript-eslint/no-duplicate-type-constituents": "off",
1140
+ "@typescript-eslint/no-floating-promises": "off",
1141
+ "@typescript-eslint/no-for-in-array": "off",
1142
+ "@typescript-eslint/no-implied-eval": "off",
1143
+ "@typescript-eslint/no-meaningless-void-operator": "off",
1144
+ "@typescript-eslint/no-misused-promises": "off",
1145
+ "@typescript-eslint/no-mixed-enums": "off",
1146
+ "@typescript-eslint/no-redundant-type-constituents": "off",
1147
+ "@typescript-eslint/no-throw-literal": "off",
1148
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
1149
+ "@typescript-eslint/no-unnecessary-condition": "off",
1150
+ "@typescript-eslint/no-unnecessary-qualifier": "off",
1151
+ "@typescript-eslint/no-unnecessary-type-arguments": "off",
1152
+ "@typescript-eslint/no-unnecessary-type-assertion": "off",
1153
+ "@typescript-eslint/no-unsafe-argument": "off",
1154
+ "@typescript-eslint/no-unsafe-assignment": "off",
1155
+ "@typescript-eslint/no-unsafe-call": "off",
1156
+ "@typescript-eslint/no-unsafe-enum-comparison": "off",
1157
+ "@typescript-eslint/no-unsafe-member-access": "off",
1138
1158
  "@typescript-eslint/no-unsafe-return": "off",
1139
- "@typescript-eslint/no-unsafe-unary-minus": "error",
1159
+ "@typescript-eslint/no-unsafe-unary-minus": "off",
1140
1160
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
1141
- "@typescript-eslint/prefer-destructuring": "warn",
1142
- "@typescript-eslint/prefer-includes": "warn",
1161
+ "@typescript-eslint/prefer-destructuring": "off",
1162
+ "@typescript-eslint/prefer-includes": "off",
1143
1163
  "@typescript-eslint/prefer-nullish-coalescing": "off",
1144
1164
  "@typescript-eslint/prefer-optional-chain": "off",
1145
- "@typescript-eslint/prefer-readonly": "warn",
1165
+ "@typescript-eslint/prefer-readonly": "off",
1146
1166
  "@typescript-eslint/prefer-readonly-parameter-types": "off",
1147
- "@typescript-eslint/prefer-reduce-type-parameter": "warn",
1148
- "@typescript-eslint/prefer-regexp-exec": "warn",
1149
- "@typescript-eslint/prefer-return-this-type": "warn",
1167
+ "@typescript-eslint/prefer-reduce-type-parameter": "off",
1168
+ "@typescript-eslint/prefer-regexp-exec": "off",
1169
+ "@typescript-eslint/prefer-return-this-type": "off",
1150
1170
  "@typescript-eslint/prefer-string-starts-ends-with": "off",
1151
- "@typescript-eslint/promise-function-async": "warn",
1152
- "@typescript-eslint/require-array-sort-compare": "error",
1153
- "@typescript-eslint/require-await": "error",
1154
- "@typescript-eslint/restrict-plus-operands": "error",
1155
- "@typescript-eslint/restrict-template-expressions": "error",
1156
- "@typescript-eslint/return-await": "warn",
1171
+ "@typescript-eslint/promise-function-async": "off",
1172
+ "@typescript-eslint/require-array-sort-compare": "off",
1173
+ "@typescript-eslint/require-await": "off",
1174
+ "@typescript-eslint/restrict-plus-operands": "off",
1175
+ "@typescript-eslint/restrict-template-expressions": "off",
1176
+ "@typescript-eslint/return-await": "off",
1157
1177
  "@typescript-eslint/strict-boolean-expressions": "off",
1158
- "@typescript-eslint/switch-exhaustiveness-check": "error",
1159
- "@typescript-eslint/unbound-method": "error"
1178
+ "@typescript-eslint/switch-exhaustiveness-check": "off",
1179
+ "@typescript-eslint/unbound-method": "off"
1160
1180
  } : {},
1161
1181
  /**
1162
1182
  * Off for Prettier
@@ -1510,7 +1530,7 @@ function factory(options) {
1510
1530
  configs.push(node());
1511
1531
  }
1512
1532
  if (isTailwind) {
1513
- configs.push(node());
1533
+ configs.push(tailwind());
1514
1534
  }
1515
1535
  if (testingFramework === "jest") {
1516
1536
  configs.push(jest());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "Will Stone's ESLint config",
5
5
  "keywords": [
6
6
  "eslint-config"
@@ -43,17 +43,16 @@
43
43
  },
44
44
  "prettier": "@will-stone/prettier-config",
45
45
  "dependencies": {
46
- "@typescript-eslint/eslint-plugin": "^6.11.0",
47
- "@typescript-eslint/parser": "^6.11.0",
46
+ "@typescript-eslint/eslint-plugin": "^6.14.0",
47
+ "@typescript-eslint/parser": "^6.14.0",
48
48
  "astro-eslint-parser": "^0.16.0",
49
49
  "confusing-browser-globals": "^1.0.11",
50
- "eslint-config-flat-gitignore": "^0.1.1",
51
- "eslint-define-config": "^1.24.1",
52
- "eslint-plugin-astro": "^0.29.1",
50
+ "eslint-config-flat-gitignore": "^0.1.2",
51
+ "eslint-plugin-astro": "^0.31.0",
53
52
  "eslint-plugin-i": "^2.29.0",
54
53
  "eslint-plugin-jest": "^27.6.0",
55
54
  "eslint-plugin-jsx-a11y": "^6.8.0",
56
- "eslint-plugin-n": "^16.3.1",
55
+ "eslint-plugin-n": "^16.4.0",
57
56
  "eslint-plugin-prettier": "^5.0.1",
58
57
  "eslint-plugin-react": "^7.33.2",
59
58
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -62,24 +61,24 @@
62
61
  "eslint-plugin-tailwindcss": "^3.13.0",
63
62
  "eslint-plugin-unicorn": "^49.0.0",
64
63
  "glob": "^10.3.10",
65
- "globals": "^13.23.0",
64
+ "globals": "^13.24.0",
66
65
  "globby": "^14.0.0",
67
66
  "load-json-file": "^7.0.1"
68
67
  },
69
68
  "devDependencies": {
70
- "@changesets/cli": "^2.26.2",
69
+ "@changesets/cli": "^2.27.1",
71
70
  "@types/confusing-browser-globals": "^1.0.3",
72
- "@types/eslint": "^8.44.7",
73
- "@types/node": "^20.9.0",
74
- "@will-stone/prettier-config": "^7.0.1",
75
- "eslint": "^8.52.0",
76
- "eslint-flat-config-viewer": "^0.1.1",
71
+ "@types/eslint": "^8.44.9",
72
+ "@types/node": "^20.10.4",
73
+ "@will-stone/prettier-config": "^7.0.2",
74
+ "eslint": "^8.56.0",
75
+ "eslint-flat-config-viewer": "^0.1.3",
77
76
  "husky": "^8.0.3",
78
- "lint-staged": "^15.1.0",
79
- "prettier": "^3.1.0",
80
- "tsup": "^7.2.0",
81
- "type-fest": "^4.7.1",
82
- "typescript": "^5.2.2"
77
+ "lint-staged": "^15.2.0",
78
+ "prettier": "^3.1.1",
79
+ "tsup": "^8.0.1",
80
+ "type-fest": "^4.8.3",
81
+ "typescript": "^5.3.3"
83
82
  },
84
83
  "peerDependencies": {
85
84
  "eslint": ">=8.53.0"