@coderwyd/eslint-config 2.5.1 → 2.5.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/cli.cjs CHANGED
@@ -46,7 +46,7 @@ var import_parse_gitignore = __toESM(require("parse-gitignore"), 1);
46
46
  var import_picocolors = __toESM(require("picocolors"), 1);
47
47
 
48
48
  // package.json
49
- var version = "2.5.1";
49
+ var version = "2.5.2";
50
50
  var devDependencies = {
51
51
  "@antfu/ni": "^0.21.12",
52
52
  "@eslint-react/eslint-plugin": "^1.5.12",
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ import parse from "parse-gitignore";
17
17
  import c from "picocolors";
18
18
 
19
19
  // package.json
20
- var version = "2.5.1";
20
+ var version = "2.5.2";
21
21
  var devDependencies = {
22
22
  "@antfu/ni": "^0.21.12",
23
23
  "@eslint-react/eslint-plugin": "^1.5.12",
package/dist/index.cjs CHANGED
@@ -288,9 +288,9 @@ async function javascript(options = {}) {
288
288
  "no-new": "error",
289
289
  "no-new-func": "error",
290
290
  "no-new-native-nonconstructor": "error",
291
- "no-new-object": "error",
292
291
  "no-new-wrappers": "error",
293
292
  "no-obj-calls": "error",
293
+ "no-object-constructor": "error",
294
294
  "no-octal": "error",
295
295
  "no-octal-escape": "error",
296
296
  "no-proto": "error",
@@ -1283,9 +1283,13 @@ async function vue(options = {}) {
1283
1283
  order: isVue3 ? ["script", "template", "style"] : ["template", "script", "style"]
1284
1284
  }
1285
1285
  ],
1286
+ // 'vue/component-api-style': ['warn', ['script-setup', 'composition']],
1286
1287
  "vue/component-name-in-template-casing": ["error", "PascalCase"],
1287
1288
  "vue/component-options-name-casing": ["error", "PascalCase"],
1289
+ // this is deprecated
1290
+ "vue/component-tags-order": "off",
1288
1291
  "vue/custom-event-name-casing": ["error", "camelCase"],
1292
+ // 'vue/define-emits-declaration': ['warn', 'type-based'],
1289
1293
  "vue/define-macros-order": [
1290
1294
  "error",
1291
1295
  {
@@ -1297,31 +1301,35 @@ async function vue(options = {}) {
1297
1301
  ]
1298
1302
  }
1299
1303
  ],
1304
+ // 'vue/define-props-declaration': ['warn', 'type-based'],
1300
1305
  "vue/dot-location": ["error", "property"],
1301
1306
  "vue/dot-notation": ["error", { allowKeywords: true }],
1302
1307
  "vue/eqeqeq": ["error", "smart"],
1303
1308
  "vue/html-indent": ["error", indent],
1309
+ // 'vue/html-self-closing': [
1310
+ // 'error',
1311
+ // {
1312
+ // html: {
1313
+ // component: 'always',
1314
+ // normal: 'always',
1315
+ // void: 'any',
1316
+ // },
1317
+ // math: 'always',
1318
+ // svg: 'always',
1319
+ // },
1304
1320
  "vue/html-quotes": ["error", "double"],
1305
- "vue/html-self-closing": [
1306
- "error",
1307
- {
1308
- html: {
1309
- component: "always",
1310
- normal: "always",
1311
- void: "any"
1312
- },
1313
- math: "always",
1314
- svg: "always"
1315
- }
1316
- ],
1321
+ // ],
1317
1322
  "vue/max-attributes-per-line": "off",
1318
1323
  "vue/multi-word-component-names": "off",
1324
+ // 'vue/next-tick-style': ['warn', 'promise'],
1319
1325
  "vue/no-constant-condition": "warn",
1320
1326
  "vue/no-dupe-keys": "off",
1327
+ "vue/no-duplicate-attr-inheritance": "warn",
1321
1328
  "vue/no-empty-pattern": "error",
1322
1329
  "vue/no-extra-parens": ["error", "functions"],
1323
1330
  "vue/no-irregular-whitespace": "error",
1324
1331
  "vue/no-loss-of-precision": "error",
1332
+ "vue/no-required-prop-with-default": "warn",
1325
1333
  "vue/no-restricted-syntax": [
1326
1334
  "error",
1327
1335
  "DebuggerStatement",
@@ -1331,9 +1339,14 @@ async function vue(options = {}) {
1331
1339
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
1332
1340
  "vue/no-setup-props-reactivity-loss": "off",
1333
1341
  "vue/no-sparse-arrays": "error",
1342
+ "vue/no-unsupported-features": "warn",
1343
+ "vue/no-unused-emit-declarations": "warn",
1334
1344
  "vue/no-unused-refs": "error",
1345
+ "vue/no-use-v-else-with-v-for": "error",
1346
+ "vue/no-useless-mustaches": "warn",
1335
1347
  "vue/no-useless-v-bind": "error",
1336
1348
  "vue/no-v-html": "off",
1349
+ "vue/no-v-text": "warn",
1337
1350
  "vue/object-shorthand": [
1338
1351
  "error",
1339
1352
  "always",
@@ -1342,10 +1355,21 @@ async function vue(options = {}) {
1342
1355
  ignoreConstructors: false
1343
1356
  }
1344
1357
  ],
1358
+ "vue/prefer-define-options": "warn",
1345
1359
  "vue/prefer-separate-static-class": "error",
1346
1360
  "vue/prefer-template": "error",
1347
1361
  "vue/prop-name-casing": ["error", "camelCase"],
1348
1362
  "vue/require-default-prop": "off",
1363
+ "vue/require-macro-variable-name": [
1364
+ "warn",
1365
+ {
1366
+ defineEmits: "emit",
1367
+ defineProps: "props",
1368
+ defineSlots: "slots",
1369
+ useAttrs: "attrs",
1370
+ useSlots: "slots"
1371
+ }
1372
+ ],
1349
1373
  "vue/require-prop-types": "off",
1350
1374
  "vue/space-infix-ops": "error",
1351
1375
  "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
@@ -1369,6 +1393,7 @@ async function vue(options = {}) {
1369
1393
  "vue/comma-dangle": ["error", "always-multiline"],
1370
1394
  "vue/comma-spacing": ["error", { after: true, before: false }],
1371
1395
  "vue/comma-style": ["error", "last"],
1396
+ "vue/html-comment-content-newline": "warn",
1372
1397
  "vue/html-comment-content-spacing": [
1373
1398
  "error",
1374
1399
  "always",
package/dist/index.js CHANGED
@@ -243,9 +243,9 @@ async function javascript(options = {}) {
243
243
  "no-new": "error",
244
244
  "no-new-func": "error",
245
245
  "no-new-native-nonconstructor": "error",
246
- "no-new-object": "error",
247
246
  "no-new-wrappers": "error",
248
247
  "no-obj-calls": "error",
248
+ "no-object-constructor": "error",
249
249
  "no-octal": "error",
250
250
  "no-octal-escape": "error",
251
251
  "no-proto": "error",
@@ -1238,9 +1238,13 @@ async function vue(options = {}) {
1238
1238
  order: isVue3 ? ["script", "template", "style"] : ["template", "script", "style"]
1239
1239
  }
1240
1240
  ],
1241
+ // 'vue/component-api-style': ['warn', ['script-setup', 'composition']],
1241
1242
  "vue/component-name-in-template-casing": ["error", "PascalCase"],
1242
1243
  "vue/component-options-name-casing": ["error", "PascalCase"],
1244
+ // this is deprecated
1245
+ "vue/component-tags-order": "off",
1243
1246
  "vue/custom-event-name-casing": ["error", "camelCase"],
1247
+ // 'vue/define-emits-declaration': ['warn', 'type-based'],
1244
1248
  "vue/define-macros-order": [
1245
1249
  "error",
1246
1250
  {
@@ -1252,31 +1256,35 @@ async function vue(options = {}) {
1252
1256
  ]
1253
1257
  }
1254
1258
  ],
1259
+ // 'vue/define-props-declaration': ['warn', 'type-based'],
1255
1260
  "vue/dot-location": ["error", "property"],
1256
1261
  "vue/dot-notation": ["error", { allowKeywords: true }],
1257
1262
  "vue/eqeqeq": ["error", "smart"],
1258
1263
  "vue/html-indent": ["error", indent],
1264
+ // 'vue/html-self-closing': [
1265
+ // 'error',
1266
+ // {
1267
+ // html: {
1268
+ // component: 'always',
1269
+ // normal: 'always',
1270
+ // void: 'any',
1271
+ // },
1272
+ // math: 'always',
1273
+ // svg: 'always',
1274
+ // },
1259
1275
  "vue/html-quotes": ["error", "double"],
1260
- "vue/html-self-closing": [
1261
- "error",
1262
- {
1263
- html: {
1264
- component: "always",
1265
- normal: "always",
1266
- void: "any"
1267
- },
1268
- math: "always",
1269
- svg: "always"
1270
- }
1271
- ],
1276
+ // ],
1272
1277
  "vue/max-attributes-per-line": "off",
1273
1278
  "vue/multi-word-component-names": "off",
1279
+ // 'vue/next-tick-style': ['warn', 'promise'],
1274
1280
  "vue/no-constant-condition": "warn",
1275
1281
  "vue/no-dupe-keys": "off",
1282
+ "vue/no-duplicate-attr-inheritance": "warn",
1276
1283
  "vue/no-empty-pattern": "error",
1277
1284
  "vue/no-extra-parens": ["error", "functions"],
1278
1285
  "vue/no-irregular-whitespace": "error",
1279
1286
  "vue/no-loss-of-precision": "error",
1287
+ "vue/no-required-prop-with-default": "warn",
1280
1288
  "vue/no-restricted-syntax": [
1281
1289
  "error",
1282
1290
  "DebuggerStatement",
@@ -1286,9 +1294,14 @@ async function vue(options = {}) {
1286
1294
  "vue/no-restricted-v-bind": ["error", "/^v-/"],
1287
1295
  "vue/no-setup-props-reactivity-loss": "off",
1288
1296
  "vue/no-sparse-arrays": "error",
1297
+ "vue/no-unsupported-features": "warn",
1298
+ "vue/no-unused-emit-declarations": "warn",
1289
1299
  "vue/no-unused-refs": "error",
1300
+ "vue/no-use-v-else-with-v-for": "error",
1301
+ "vue/no-useless-mustaches": "warn",
1290
1302
  "vue/no-useless-v-bind": "error",
1291
1303
  "vue/no-v-html": "off",
1304
+ "vue/no-v-text": "warn",
1292
1305
  "vue/object-shorthand": [
1293
1306
  "error",
1294
1307
  "always",
@@ -1297,10 +1310,21 @@ async function vue(options = {}) {
1297
1310
  ignoreConstructors: false
1298
1311
  }
1299
1312
  ],
1313
+ "vue/prefer-define-options": "warn",
1300
1314
  "vue/prefer-separate-static-class": "error",
1301
1315
  "vue/prefer-template": "error",
1302
1316
  "vue/prop-name-casing": ["error", "camelCase"],
1303
1317
  "vue/require-default-prop": "off",
1318
+ "vue/require-macro-variable-name": [
1319
+ "warn",
1320
+ {
1321
+ defineEmits: "emit",
1322
+ defineProps: "props",
1323
+ defineSlots: "slots",
1324
+ useAttrs: "attrs",
1325
+ useSlots: "slots"
1326
+ }
1327
+ ],
1304
1328
  "vue/require-prop-types": "off",
1305
1329
  "vue/space-infix-ops": "error",
1306
1330
  "vue/space-unary-ops": ["error", { nonwords: false, words: true }],
@@ -1324,6 +1348,7 @@ async function vue(options = {}) {
1324
1348
  "vue/comma-dangle": ["error", "always-multiline"],
1325
1349
  "vue/comma-spacing": ["error", { after: true, before: false }],
1326
1350
  "vue/comma-style": ["error", "last"],
1351
+ "vue/html-comment-content-newline": "warn",
1327
1352
  "vue/html-comment-content-spacing": [
1328
1353
  "error",
1329
1354
  "always",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coderwyd/eslint-config",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.5.2",
5
5
  "description": "Donny's ESLint config",
6
6
  "author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
7
7
  "license": "MIT",