@jsse/eslint-config 0.3.6 → 0.3.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @jsse/eslint-config
2
2
 
3
+ ## 0.3.7
4
+
5
+ ### Patch Changes
6
+
7
+ - b9b98b1: update sorting package json
8
+
3
9
  ## 0.3.6
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -7,7 +7,8 @@ Eslint config
7
7
  - eslint flat config
8
8
  - double quotes + semi
9
9
  - react, react-hooks & react-refresh, OH MY!
10
- - no vue (I don't use vue (as of 2023-10-12) don't want/need the vue plugins/parsers/etc)
10
+ - no vue (I don't use vue (as of 2023-10-12) don't want/need the vue
11
+ plugins/parsers/etc)
11
12
  - assumes you're using prettier
12
13
  - Based on:
13
14
  - My old, very long, and very messy (non-flat) eslint config (`.eslintrc.js`)
@@ -24,7 +25,8 @@ pnpm i -D eslint @jsse/eslint-config
24
25
 
25
26
  ### Create config file
26
27
 
27
- With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in `package.json` (recommended):
28
+ With [`"type": "module"`](https://nodejs.org/api/packages.html#type) in
29
+ `package.json` (recommended):
28
30
 
29
31
  ```js
30
32
  // eslint.config.js
@@ -52,7 +54,8 @@ module.exports = require("@jsse/eslint-config").jsse({
52
54
  });
53
55
  ```
54
56
 
55
- > Note that `.eslintignore` no longer works in Flat config, see [customization](#customization) for more details.
57
+ > Note that `.eslintignore` no longer works in Flat config, see
58
+ > [customization](#customization) for more details.
56
59
 
57
60
  ### Add script for package.json
58
61
 
@@ -69,8 +72,9 @@ For example:
69
72
 
70
73
  ### Type Aware Rules
71
74
 
72
- You can optionally enable the [type aware rules](https://typescript-eslint.io/linting/typed-linting/) by passing the
73
- options object to the `typescript` config:
75
+ You can optionally enable the
76
+ [type aware rules](https://typescript-eslint.io/linting/typed-linting/) by
77
+ passing the options object to the `typescript` config:
74
78
 
75
79
  ```js
76
80
  // eslint.config.js
@@ -85,8 +89,8 @@ export default jsse({
85
89
 
86
90
  ## Thanks
87
91
 
88
- - [antfu](https://github.com/antfu) and [sxzz](https://github.com/sxzz) for their eslint-configs which
89
- this is based on
92
+ - [antfu](https://github.com/antfu) and [sxzz](https://github.com/sxzz) for
93
+ their eslint-configs which this is based on
90
94
  - Younger me for being more willing to spend time configuring eslint
91
95
  - My fans for being my fans
92
96
 
@@ -94,15 +98,16 @@ export default jsse({
94
98
 
95
99
  ### Why use prettier?
96
100
 
97
- I DO NOT CARE ANYMORE... My current stance on formatters is pick one that is stable, and use it, preferably with the
98
- default config.
101
+ I DO NOT CARE ANYMORE... My current stance on formatters is pick one that is
102
+ stable, and use it, preferably with the default config.
99
103
 
100
- A younger me (jessekrubin) would take the time to configure a formatter/linter/code style to my liking, but I really
101
- don't care anymore...
104
+ A younger me (jessekrubin) would take the time to configure a
105
+ formatter/linter/code style to my liking, but I really don't care anymore...
102
106
 
103
107
  ## License
104
108
 
105
- [MIT](./LICENSE) License © 2023-PRESENT [jesse rubin](https://github.com/jessekrubin)
109
+ [MIT](./LICENSE) License © 2023-PRESENT
110
+ [jesse rubin](https://github.com/jessekrubin)
106
111
 
107
112
  [package-url]: https://www.npmjs.com/package/@jsse/eslint-config
108
113
  [npm-version-svg]: https://badge.fury.io/js/@jsse%2Feslint-config.svg
package/dist/cli.js CHANGED
@@ -588,7 +588,7 @@ var CAC = class extends EventEmitter {
588
588
  var cac = (name = "") => new CAC(name);
589
589
 
590
590
  // src/generated/version.ts
591
- var VERSION = "0.3.6";
591
+ var VERSION = "0.3.7";
592
592
 
593
593
  // src/cli.ts
594
594
  var cli = cac("jsselint");
@@ -29,6 +29,7 @@ export const sortPackageJson = async () => {
29
29
  "packageManager",
30
30
  "description",
31
31
  "author",
32
+ "contributors",
32
33
  "license",
33
34
  "funding",
34
35
  "homepage",
@@ -37,6 +38,7 @@ export const sortPackageJson = async () => {
37
38
  "keywords",
38
39
  "categories",
39
40
  "sideEffects",
41
+ "imports",
40
42
  "exports",
41
43
  "main",
42
44
  "module",
@@ -68,20 +70,31 @@ export const sortPackageJson = async () => {
68
70
  },
69
71
  {
70
72
  order: { type: "asc" },
71
- pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies$",
73
+ pathPattern: "^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$",
72
74
  },
73
75
  {
74
76
  order: { type: "asc" },
75
- pathPattern: "^resolutions$",
76
- },
77
- {
78
- order: { type: "asc" },
79
- pathPattern: "^pnpm.overrides$",
77
+ pathPattern: "^(?:resolutions|overrides|pnpm.overrides)$",
80
78
  },
81
79
  {
82
80
  order: ["types", "import", "require", "default"],
83
81
  pathPattern: "^exports.*$",
84
82
  },
83
+ {
84
+ order: [
85
+ "pre-commit",
86
+ "prepare-commit-msg",
87
+ "commit-msg",
88
+ "post-commit",
89
+ "pre-rebase",
90
+ "post-rewrite",
91
+ "post-checkout",
92
+ "post-merge",
93
+ "pre-push",
94
+ "pre-auto-gc",
95
+ ],
96
+ pathPattern: "^(?:gitHooks|husky|simple-git-hooks)$",
97
+ },
85
98
  ],
86
99
  },
87
100
  },
@@ -23,6 +23,7 @@ export const requiresTypeChecking = [
23
23
  "@typescript-eslint/no-unnecessary-template-expression",
24
24
  "@typescript-eslint/no-unnecessary-type-arguments",
25
25
  "@typescript-eslint/no-unnecessary-type-assertion",
26
+ "@typescript-eslint/no-unnecessary-type-conversion",
26
27
  "@typescript-eslint/no-unnecessary-type-parameters",
27
28
  "@typescript-eslint/no-unsafe-argument",
28
29
  "@typescript-eslint/no-unsafe-assignment",
@@ -239,6 +239,7 @@ export const fixableRules = {
239
239
  "@typescript-eslint/no-unnecessary-template-expression",
240
240
  "@typescript-eslint/no-unnecessary-type-arguments",
241
241
  "@typescript-eslint/no-unnecessary-type-assertion",
242
+ "@typescript-eslint/no-unnecessary-type-conversion",
242
243
  "@typescript-eslint/no-useless-empty-export",
243
244
  "@typescript-eslint/no-wrapper-object-types",
244
245
  "@typescript-eslint/non-nullable-type-assertion-style",
@@ -273,13 +274,11 @@ export const fixableRules = {
273
274
  "unicorn/new-for-builtins",
274
275
  "unicorn/no-array-for-each",
275
276
  "unicorn/no-array-method-this-argument",
276
- "unicorn/no-array-push-push",
277
277
  "unicorn/no-await-expression-member",
278
278
  "unicorn/no-console-spaces",
279
279
  "unicorn/no-for-loop",
280
280
  "unicorn/no-hex-escape",
281
281
  "unicorn/no-instanceof-builtins",
282
- "unicorn/no-length-as-slice-end",
283
282
  "unicorn/no-lonely-if",
284
283
  "unicorn/no-named-default",
285
284
  "unicorn/no-negated-condition",
@@ -290,7 +289,10 @@ export const fixableRules = {
290
289
  "unicorn/no-single-promise-in-promise-methods",
291
290
  "unicorn/no-static-only-class",
292
291
  "unicorn/no-typeof-undefined",
292
+ "unicorn/no-unnecessary-array-flat-depth",
293
+ "unicorn/no-unnecessary-array-splice-count",
293
294
  "unicorn/no-unnecessary-await",
295
+ "unicorn/no-unnecessary-slice-end",
294
296
  "unicorn/no-unreadable-array-destructuring",
295
297
  "unicorn/no-useless-fallback-in-spread",
296
298
  "unicorn/no-useless-length-check",
@@ -314,6 +316,7 @@ export const fixableRules = {
314
316
  "unicorn/prefer-dom-node-remove",
315
317
  "unicorn/prefer-export-from",
316
318
  "unicorn/prefer-global-this",
319
+ "unicorn/prefer-import-meta-properties",
317
320
  "unicorn/prefer-includes",
318
321
  "unicorn/prefer-json-parse-buffer",
319
322
  "unicorn/prefer-keyboard-event-key",
@@ -334,6 +337,7 @@ export const fixableRules = {
334
337
  "unicorn/prefer-regexp-test",
335
338
  "unicorn/prefer-set-has",
336
339
  "unicorn/prefer-set-size",
340
+ "unicorn/prefer-single-call",
337
341
  "unicorn/prefer-spread",
338
342
  "unicorn/prefer-string-raw",
339
343
  "unicorn/prefer-string-replace-all",
@@ -1 +1 @@
1
- export declare const VERSION = "0.3.6";
1
+ export declare const VERSION = "0.3.7";
@@ -1 +1 @@
1
- export const VERSION = "0.3.6";
1
+ export const VERSION = "0.3.7";