@will-stone/eslint-config 0.6.0 → 0.7.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/dist/index.cjs +12 -25
- package/dist/index.js +11 -24
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -179,9 +179,7 @@ function base() {
|
|
|
179
179
|
"camelcase": "error",
|
|
180
180
|
// Write comments however you like
|
|
181
181
|
"capitalized-comments": "off",
|
|
182
|
-
|
|
183
|
-
// it can sometimes be made into a static function
|
|
184
|
-
"class-methods-use-this": "error",
|
|
182
|
+
"class-methods-use-this": "off",
|
|
185
183
|
// Measures the number of linearly independent paths through a program's
|
|
186
184
|
// source code. Rubbish. Use your own judgement on complexity.
|
|
187
185
|
"complexity": "off",
|
|
@@ -478,6 +476,7 @@ function base() {
|
|
|
478
476
|
"no-nonoctal-decimal-escape": "error",
|
|
479
477
|
// This rule disallows calling the Math, JSON, Reflect and Atomics objects as functions.
|
|
480
478
|
"no-obj-calls": "error",
|
|
479
|
+
"no-object-constructor": "error",
|
|
481
480
|
// the leading zero which identifies an octal literal has been a source of
|
|
482
481
|
// confusion and error in JavaScript code, ECMAScript 5 deprecates the use
|
|
483
482
|
// of octal numeric literals.
|
|
@@ -774,13 +773,13 @@ function ignores() {
|
|
|
774
773
|
}
|
|
775
774
|
|
|
776
775
|
// src/configs/imports.ts
|
|
777
|
-
var
|
|
776
|
+
var pluginImport = __toESM(require("eslint-plugin-i"), 1);
|
|
778
777
|
var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"), 1);
|
|
779
778
|
function imports() {
|
|
780
779
|
return [
|
|
781
780
|
{
|
|
782
781
|
plugins: {
|
|
783
|
-
"import":
|
|
782
|
+
"import": pluginImport,
|
|
784
783
|
"simple-import-sort": import_eslint_plugin_simple_import_sort.default
|
|
785
784
|
},
|
|
786
785
|
rules: {
|
|
@@ -1246,26 +1245,9 @@ function react() {
|
|
|
1246
1245
|
"react/jsx-props-no-multi-spaces": "off",
|
|
1247
1246
|
"react/jsx-tag-spacing": "off",
|
|
1248
1247
|
"react/jsx-wrap-multilines": "off",
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
{
|
|
1253
|
-
exceptMethods: [
|
|
1254
|
-
"render",
|
|
1255
|
-
"getInitialState",
|
|
1256
|
-
"getDefaultProps",
|
|
1257
|
-
"getChildContext",
|
|
1258
|
-
"componentWillMount",
|
|
1259
|
-
"componentDidMount",
|
|
1260
|
-
"componentWillReceiveProps",
|
|
1261
|
-
"shouldComponentUpdate",
|
|
1262
|
-
"componentWillUpdate",
|
|
1263
|
-
"componentDidUpdate",
|
|
1264
|
-
"componentWillUnmount",
|
|
1265
|
-
"componentDidCatch"
|
|
1266
|
-
]
|
|
1267
|
-
}
|
|
1268
|
-
],
|
|
1248
|
+
/**
|
|
1249
|
+
* React
|
|
1250
|
+
*/
|
|
1269
1251
|
"react/boolean-prop-naming": "error",
|
|
1270
1252
|
"react/button-has-type": "error",
|
|
1271
1253
|
"react/default-props-match-prop-types": "error",
|
|
@@ -1381,6 +1363,9 @@ function react() {
|
|
|
1381
1363
|
"react/static-property-placement": "error",
|
|
1382
1364
|
"react/style-prop-object": "error",
|
|
1383
1365
|
"react/void-dom-elements-no-children": "error",
|
|
1366
|
+
/**
|
|
1367
|
+
* Hooks
|
|
1368
|
+
*/
|
|
1384
1369
|
// Checks effect dependencies
|
|
1385
1370
|
"react-hooks/exhaustive-deps": "warn",
|
|
1386
1371
|
// Checks rules of Hooks
|
|
@@ -1576,6 +1561,7 @@ function typescript() {
|
|
|
1576
1561
|
/**
|
|
1577
1562
|
* Superseded by TS rules below
|
|
1578
1563
|
*/
|
|
1564
|
+
"class-methods-use-this": "off",
|
|
1579
1565
|
"default-param-last": "off",
|
|
1580
1566
|
"lines-between-class-members": "off",
|
|
1581
1567
|
"no-duplicate-imports": "off",
|
|
@@ -1599,6 +1585,7 @@ function typescript() {
|
|
|
1599
1585
|
"@typescript-eslint/ban-tslint-comment": "warn",
|
|
1600
1586
|
// Ensures that literals on classes are exposed in a consistent style
|
|
1601
1587
|
"@typescript-eslint/class-literal-property-style": "warn",
|
|
1588
|
+
"@typescript-eslint/class-methods-use-this": "off",
|
|
1602
1589
|
// https://typescript-eslint.io/rules/consistent-generic-constructors/
|
|
1603
1590
|
"@typescript-eslint/consistent-generic-constructors": "warn",
|
|
1604
1591
|
// Enforce the use of the record type
|
package/dist/index.js
CHANGED
|
@@ -143,9 +143,7 @@ function base() {
|
|
|
143
143
|
"camelcase": "error",
|
|
144
144
|
// Write comments however you like
|
|
145
145
|
"capitalized-comments": "off",
|
|
146
|
-
|
|
147
|
-
// it can sometimes be made into a static function
|
|
148
|
-
"class-methods-use-this": "error",
|
|
146
|
+
"class-methods-use-this": "off",
|
|
149
147
|
// Measures the number of linearly independent paths through a program's
|
|
150
148
|
// source code. Rubbish. Use your own judgement on complexity.
|
|
151
149
|
"complexity": "off",
|
|
@@ -442,6 +440,7 @@ function base() {
|
|
|
442
440
|
"no-nonoctal-decimal-escape": "error",
|
|
443
441
|
// This rule disallows calling the Math, JSON, Reflect and Atomics objects as functions.
|
|
444
442
|
"no-obj-calls": "error",
|
|
443
|
+
"no-object-constructor": "error",
|
|
445
444
|
// the leading zero which identifies an octal literal has been a source of
|
|
446
445
|
// confusion and error in JavaScript code, ECMAScript 5 deprecates the use
|
|
447
446
|
// of octal numeric literals.
|
|
@@ -738,7 +737,7 @@ function ignores() {
|
|
|
738
737
|
}
|
|
739
738
|
|
|
740
739
|
// src/configs/imports.ts
|
|
741
|
-
import pluginImport from "eslint-plugin-i";
|
|
740
|
+
import * as pluginImport from "eslint-plugin-i";
|
|
742
741
|
import pluginSimpleImport from "eslint-plugin-simple-import-sort";
|
|
743
742
|
function imports() {
|
|
744
743
|
return [
|
|
@@ -1210,26 +1209,9 @@ function react() {
|
|
|
1210
1209
|
"react/jsx-props-no-multi-spaces": "off",
|
|
1211
1210
|
"react/jsx-tag-spacing": "off",
|
|
1212
1211
|
"react/jsx-wrap-multilines": "off",
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
{
|
|
1217
|
-
exceptMethods: [
|
|
1218
|
-
"render",
|
|
1219
|
-
"getInitialState",
|
|
1220
|
-
"getDefaultProps",
|
|
1221
|
-
"getChildContext",
|
|
1222
|
-
"componentWillMount",
|
|
1223
|
-
"componentDidMount",
|
|
1224
|
-
"componentWillReceiveProps",
|
|
1225
|
-
"shouldComponentUpdate",
|
|
1226
|
-
"componentWillUpdate",
|
|
1227
|
-
"componentDidUpdate",
|
|
1228
|
-
"componentWillUnmount",
|
|
1229
|
-
"componentDidCatch"
|
|
1230
|
-
]
|
|
1231
|
-
}
|
|
1232
|
-
],
|
|
1212
|
+
/**
|
|
1213
|
+
* React
|
|
1214
|
+
*/
|
|
1233
1215
|
"react/boolean-prop-naming": "error",
|
|
1234
1216
|
"react/button-has-type": "error",
|
|
1235
1217
|
"react/default-props-match-prop-types": "error",
|
|
@@ -1345,6 +1327,9 @@ function react() {
|
|
|
1345
1327
|
"react/static-property-placement": "error",
|
|
1346
1328
|
"react/style-prop-object": "error",
|
|
1347
1329
|
"react/void-dom-elements-no-children": "error",
|
|
1330
|
+
/**
|
|
1331
|
+
* Hooks
|
|
1332
|
+
*/
|
|
1348
1333
|
// Checks effect dependencies
|
|
1349
1334
|
"react-hooks/exhaustive-deps": "warn",
|
|
1350
1335
|
// Checks rules of Hooks
|
|
@@ -1540,6 +1525,7 @@ function typescript() {
|
|
|
1540
1525
|
/**
|
|
1541
1526
|
* Superseded by TS rules below
|
|
1542
1527
|
*/
|
|
1528
|
+
"class-methods-use-this": "off",
|
|
1543
1529
|
"default-param-last": "off",
|
|
1544
1530
|
"lines-between-class-members": "off",
|
|
1545
1531
|
"no-duplicate-imports": "off",
|
|
@@ -1563,6 +1549,7 @@ function typescript() {
|
|
|
1563
1549
|
"@typescript-eslint/ban-tslint-comment": "warn",
|
|
1564
1550
|
// Ensures that literals on classes are exposed in a consistent style
|
|
1565
1551
|
"@typescript-eslint/class-literal-property-style": "warn",
|
|
1552
|
+
"@typescript-eslint/class-methods-use-this": "off",
|
|
1566
1553
|
// https://typescript-eslint.io/rules/consistent-generic-constructors/
|
|
1567
1554
|
"@typescript-eslint/consistent-generic-constructors": "warn",
|
|
1568
1555
|
// Enforce the use of the record type
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@will-stone/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Will Stone's ESLint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint-config"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/node": "^20.8.2",
|
|
73
73
|
"@will-stone/prettier-config": "^7.0.1",
|
|
74
74
|
"eslint": "^8.50.0",
|
|
75
|
-
"eslint-flat-config-viewer": "^0.0.
|
|
75
|
+
"eslint-flat-config-viewer": "^0.0.9",
|
|
76
76
|
"husky": "^8.0.3",
|
|
77
77
|
"lint-staged": "^14.0.1",
|
|
78
78
|
"prettier": "^3.0.3",
|