Skip to content

Commit

Permalink
chore: updated all devDependencies to latest (December 2024)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg authored Dec 13, 2024
2 parents 3d3d128 + a0ec369 commit 092157a
Show file tree
Hide file tree
Showing 11 changed files with 327 additions and 889 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

164 changes: 0 additions & 164 deletions .eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Each should be shown in VS Code, and can be run manually on the command-line:
- `pnpm lint` ([ESLint](https://eslint.org) with [typescript-eslint](https://typescript-eslint.io)): Lints JavaScript and TypeScript source files
- `pnpm lint:knip` ([knip](https://github.com/webpro/knip)): Detects unused files, dependencies, and code exports
- `pnpm lint:md` ([Markdownlint](https://github.com/DavidAnson/markdownlint)): Checks Markdown source files
- `pnpm lint:package-json` ([npm-package-json-lint](https://npmpackagejsonlint.org/)): Lints the `package.json` file
- `pnpm lint:packages` ([pnpm dedupe --check](https://pnpm.io/cli/dedupe)): Checks for unnecessarily duplicated packages in the `pnpm-lock.yml` file
- `pnpm lint:spelling` ([cspell](https://cspell.org)): Spell checks across all source files

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: pnpm lint:knip

name: Lint Knip
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build
- run: pnpm lint:md

name: Lint Markdown
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/lint-package-json.yml

This file was deleted.

20 changes: 6 additions & 14 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
{
"dictionaries": ["typescript"],
"ignorePaths": [
".github",
"CHANGELOG.md",
"coverage",
"lib",
"node_modules",
"pnpm-lock.yaml"
],
"words": [
"Codecov",
"codespace",
"commitlint",
"contributorsrc",
"conventionalcommits",
"allcontributors",
"apexskier",
"automerge",
"knip",
"lcov",
"markdownlintignore",
"npmpackagejsonlintrc",
"outro",
"packagejson",
"quickstart",
"tsup",
"wontfix"
"mtfoley",
"tada",
"tseslint"
]
}
101 changes: 101 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
const comments = require("@eslint-community/eslint-plugin-eslint-comments/configs");
const eslint = require("@eslint/js");
const vitest = require("@vitest/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 {
default: packageJson,
} = require("eslint-plugin-package-json/configs/recommended");
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,
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"],
packageJson,
perfectionist.configs["recommended-natural"],
regexp.configs["flat/recommended"],
{
extends: [
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
],
files: ["**/*.js", "**/*.ts"],
languageOptions: {
parserOptions: {
projectService: { allowDefaultProject: ["*.config.*s"] },
tsconfigRootDir: __dirname,
},
},
rules: {
"@typescript-eslint/no-unnecessary-condition": [
"error",
{ allowConstantLoopConditions: true },
],

// 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: ["**/*.js"],
rules: {
"@typescript-eslint/no-require-imports": "off",
},
},
{
extends: [tseslint.configs.disableTypeChecked],
files: ["**/*.md/*.ts"],
rules: {
"n/no-missing-import": [
"error",
{ allowModules: ["cspell-populate-words"] },
],
},
},
{
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: "^.*$" },
],
},
},
);
3 changes: 1 addition & 2 deletions knip.jsonc → knip.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://unpkg.com/knip@latest/schema.json",
"entry": ["src/index.ts!"],
"ignoreDependencies": ["sentences-per-line"],
"ignoreExportsUsedInFile": { "interface": true, "type": true },
"project": ["src/**/*.ts!"],
"project": ["src/**/*.ts!"]
}
Loading

0 comments on commit 092157a

Please sign in to comment.