@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.
- package/dist/index.cjs +58 -38
- package/dist/index.js +57 -37
- 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": "
|
|
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": "
|
|
1119
|
-
"@typescript-eslint/no-duplicate-type-constituents": "
|
|
1120
|
-
"@typescript-eslint/no-floating-promises": "
|
|
1121
|
-
"@typescript-eslint/no-for-in-array": "
|
|
1122
|
-
"@typescript-eslint/no-implied-eval": "
|
|
1123
|
-
"@typescript-eslint/no-meaningless-void-operator": "
|
|
1124
|
-
"@typescript-eslint/no-misused-promises": "
|
|
1125
|
-
"@typescript-eslint/no-mixed-enums": "
|
|
1126
|
-
"@typescript-eslint/no-redundant-type-constituents": "
|
|
1127
|
-
"@typescript-eslint/no-throw-literal": "
|
|
1128
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "
|
|
1129
|
-
"@typescript-eslint/no-unnecessary-condition": "
|
|
1130
|
-
"@typescript-eslint/no-unnecessary-qualifier": "
|
|
1131
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "
|
|
1132
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "
|
|
1133
|
-
"@typescript-eslint/no-unsafe-argument": "
|
|
1134
|
-
"@typescript-eslint/no-unsafe-assignment": "
|
|
1135
|
-
"@typescript-eslint/no-unsafe-call": "
|
|
1136
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "
|
|
1137
|
-
"@typescript-eslint/no-unsafe-member-access": "
|
|
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": "
|
|
1159
|
+
"@typescript-eslint/no-unsafe-unary-minus": "off",
|
|
1140
1160
|
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
1141
|
-
"@typescript-eslint/prefer-destructuring": "
|
|
1142
|
-
"@typescript-eslint/prefer-includes": "
|
|
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": "
|
|
1165
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
1146
1166
|
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
1147
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "
|
|
1148
|
-
"@typescript-eslint/prefer-regexp-exec": "
|
|
1149
|
-
"@typescript-eslint/prefer-return-this-type": "
|
|
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": "
|
|
1152
|
-
"@typescript-eslint/require-array-sort-compare": "
|
|
1153
|
-
"@typescript-eslint/require-await": "
|
|
1154
|
-
"@typescript-eslint/restrict-plus-operands": "
|
|
1155
|
-
"@typescript-eslint/restrict-template-expressions": "
|
|
1156
|
-
"@typescript-eslint/return-await": "
|
|
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": "
|
|
1159
|
-
"@typescript-eslint/unbound-method": "
|
|
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(
|
|
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": "
|
|
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": "
|
|
1119
|
-
"@typescript-eslint/no-duplicate-type-constituents": "
|
|
1120
|
-
"@typescript-eslint/no-floating-promises": "
|
|
1121
|
-
"@typescript-eslint/no-for-in-array": "
|
|
1122
|
-
"@typescript-eslint/no-implied-eval": "
|
|
1123
|
-
"@typescript-eslint/no-meaningless-void-operator": "
|
|
1124
|
-
"@typescript-eslint/no-misused-promises": "
|
|
1125
|
-
"@typescript-eslint/no-mixed-enums": "
|
|
1126
|
-
"@typescript-eslint/no-redundant-type-constituents": "
|
|
1127
|
-
"@typescript-eslint/no-throw-literal": "
|
|
1128
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "
|
|
1129
|
-
"@typescript-eslint/no-unnecessary-condition": "
|
|
1130
|
-
"@typescript-eslint/no-unnecessary-qualifier": "
|
|
1131
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "
|
|
1132
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "
|
|
1133
|
-
"@typescript-eslint/no-unsafe-argument": "
|
|
1134
|
-
"@typescript-eslint/no-unsafe-assignment": "
|
|
1135
|
-
"@typescript-eslint/no-unsafe-call": "
|
|
1136
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "
|
|
1137
|
-
"@typescript-eslint/no-unsafe-member-access": "
|
|
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": "
|
|
1159
|
+
"@typescript-eslint/no-unsafe-unary-minus": "off",
|
|
1140
1160
|
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
1141
|
-
"@typescript-eslint/prefer-destructuring": "
|
|
1142
|
-
"@typescript-eslint/prefer-includes": "
|
|
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": "
|
|
1165
|
+
"@typescript-eslint/prefer-readonly": "off",
|
|
1146
1166
|
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
1147
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "
|
|
1148
|
-
"@typescript-eslint/prefer-regexp-exec": "
|
|
1149
|
-
"@typescript-eslint/prefer-return-this-type": "
|
|
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": "
|
|
1152
|
-
"@typescript-eslint/require-array-sort-compare": "
|
|
1153
|
-
"@typescript-eslint/require-await": "
|
|
1154
|
-
"@typescript-eslint/restrict-plus-operands": "
|
|
1155
|
-
"@typescript-eslint/restrict-template-expressions": "
|
|
1156
|
-
"@typescript-eslint/return-await": "
|
|
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": "
|
|
1159
|
-
"@typescript-eslint/unbound-method": "
|
|
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(
|
|
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.
|
|
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.
|
|
47
|
-
"@typescript-eslint/parser": "^6.
|
|
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.
|
|
51
|
-
"eslint-
|
|
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.
|
|
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.
|
|
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.
|
|
69
|
+
"@changesets/cli": "^2.27.1",
|
|
71
70
|
"@types/confusing-browser-globals": "^1.0.3",
|
|
72
|
-
"@types/eslint": "^8.44.
|
|
73
|
-
"@types/node": "^20.
|
|
74
|
-
"@will-stone/prettier-config": "^7.0.
|
|
75
|
-
"eslint": "^8.
|
|
76
|
-
"eslint-flat-config-viewer": "^0.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.
|
|
79
|
-
"prettier": "^3.1.
|
|
80
|
-
"tsup": "^
|
|
81
|
-
"type-fest": "^4.
|
|
82
|
-
"typescript": "^5.
|
|
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"
|