-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump ESLint to 9, with related dependencies (#733)
## PR Checklist - [x] Addresses an existing open issue: fixes #732 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Removes `npmpackagejsonlint` since that's covered by this very plugin now. There should be no functional runtime changes. Just reorderings from the newer version of `eslint-plugin-perfectionist`. 💖
- Loading branch information
1 parent
78b3efd
commit f37aa93
Showing
16 changed files
with
486 additions
and
1,263 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
const comments = require("@eslint-community/eslint-plugin-eslint-comments/configs"); | ||
const eslint = require("@eslint/js"); | ||
const vitest = require("@vitest/eslint-plugin"); | ||
const eslintPlugin = require("eslint-plugin-eslint-plugin"); | ||
const jsdoc = require("eslint-plugin-jsdoc"); | ||
const jsonc = require("eslint-plugin-jsonc"); | ||
const markdown = require("eslint-plugin-markdown"); | ||
const n = require("eslint-plugin-n"); | ||
const perfectionist = require("eslint-plugin-perfectionist"); | ||
const regexp = require("eslint-plugin-regexp"); | ||
const yml = require("eslint-plugin-yml"); | ||
const tseslint = require("typescript-eslint"); | ||
|
||
module.exports = tseslint.config( | ||
{ | ||
ignores: [ | ||
"**/*.snap", | ||
"coverage*", | ||
"lib", | ||
"node_modules", | ||
"pnpm-lock.yaml", | ||
], | ||
}, | ||
{ linterOptions: { reportUnusedDisableDirectives: "error" } }, | ||
eslint.configs.recommended, | ||
eslintPlugin.configs["flat/recommended"], | ||
comments.recommended, | ||
jsdoc.configs["flat/contents-typescript-error"], | ||
jsdoc.configs["flat/logical-typescript-error"], | ||
jsdoc.configs["flat/stylistic-typescript-error"], | ||
jsonc.configs["flat/recommended-with-json"], | ||
markdown.configs.recommended, | ||
n.configs["flat/recommended"], | ||
perfectionist.configs["recommended-natural"], | ||
regexp.configs["flat/recommended"], | ||
{ | ||
extends: [ | ||
tseslint.configs.strictTypeChecked, | ||
tseslint.configs.stylisticTypeChecked, | ||
], | ||
files: ["**/*.js", "**/*.ts"], | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: { | ||
allowDefaultProject: [ | ||
"*.config.*s", | ||
"bin/*.js", | ||
"src/tests/*.js", | ||
], | ||
}, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
}, | ||
rules: { | ||
"@typescript-eslint/no-require-imports": "off", | ||
"jsdoc/match-description": "off", | ||
"n/no-missing-import": "off", | ||
|
||
// Stylistic concerns that don't interfere with Prettier | ||
"logical-assignment-operators": [ | ||
"error", | ||
"always", | ||
{ enforceForIfStatements: true }, | ||
], | ||
"no-useless-rename": "error", | ||
"object-shorthand": "error", | ||
"operator-assignment": "error", | ||
}, | ||
settings: { | ||
perfectionist: { partitionByComment: true, type: "natural" }, | ||
}, | ||
}, | ||
{ | ||
extends: [tseslint.configs.disableTypeChecked], | ||
files: ["**/*.md/*.js", "**/*.md/*.ts", "eslint.config.js"], | ||
}, | ||
{ | ||
files: ["**/*.md/*.jsonc"], | ||
rules: { | ||
"jsonc/comma-dangle": "off", | ||
"jsonc/no-comments": "off", | ||
}, | ||
}, | ||
{ | ||
extends: [vitest.configs.recommended], | ||
files: ["**/*.test.*"], | ||
rules: { "@typescript-eslint/no-unsafe-assignment": "off" }, | ||
}, | ||
{ | ||
extends: [ | ||
yml.configs["flat/recommended"], | ||
yml.configs["flat/prettier"], | ||
], | ||
files: ["**/*.{yml,yaml}"], | ||
rules: { | ||
"yml/file-extension": ["error", { extension: "yml" }], | ||
"yml/sort-keys": [ | ||
"error", | ||
{ order: { type: "asc" }, pathPattern: "^.*$" }, | ||
], | ||
"yml/sort-sequence-values": [ | ||
"error", | ||
{ order: { type: "asc" }, pathPattern: "^.*$" }, | ||
], | ||
}, | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.