-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: onboard to create-typescript-app (#209)
## PR Checklist - [x] Addresses an existing open issue: fixes #43; fixes #200 - [x] That issue was marked as [accepting prs](https://github.com/JoshuaKGoldberg/console-fail-test/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/console-fail-test/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Runs [`create-typescript-app`](http://github.com/JoshuaKGoldberg/create-typescript-app)'s hydration logic on this repo to bring in all the tooling goodness from that repo.
- Loading branch information
1 parent
ca28afb
commit acfe3df
Showing
95 changed files
with
9,096 additions
and
4,054 deletions.
There are no files selected for viewing
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,43 @@ | ||
{ | ||
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %> 👪\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_👪-21bb42.svg\" />", | ||
"commit": false, | ||
"commitConvention": "angular", | ||
"contributors": [ | ||
{ | ||
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4", | ||
"contributions": ["tool", "code", "maintenance"], | ||
"login": "JoshuaKGoldberg", | ||
"name": "Josh Goldberg", | ||
"profile": "http://www.joshuakgoldberg.com" | ||
}, | ||
{ | ||
"login": "kopax-polyconseil", | ||
"name": "Dimitri Kopriwa", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/77674046?v=4", | ||
"profile": "https://www.kop.ax/", | ||
"contributions": ["code"] | ||
}, | ||
{ | ||
"login": "mackenco", | ||
"name": "Colin MacKenzie", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/4284340?v=4", | ||
"profile": "https://github.com/mackenco", | ||
"contributions": ["code"] | ||
}, | ||
{ | ||
"login": "sosukesuzuki", | ||
"name": "SUZUKI Sosuke", | ||
"avatar_url": "https://avatars.githubusercontent.com/u/14838850?v=4", | ||
"profile": "https://github.com/sosukesuzuki", | ||
"contributions": ["code"] | ||
} | ||
], | ||
"contributorsPerLine": 7, | ||
"contributorsSortAlphabetically": true, | ||
"files": ["README.md"], | ||
"imageSize": 100, | ||
"projectName": "console-fail-test", | ||
"projectOwner": "JoshuaKGoldberg", | ||
"repoHost": "https://github.com", | ||
"repoType": "github" | ||
} |
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,5 @@ | ||
!.* | ||
coverage | ||
lib | ||
node_modules | ||
pnpm-lock.yaml |
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,183 @@ | ||
/** @type {import("@types/eslint").Linter.Config} */ | ||
module.exports = { | ||
env: { | ||
es2022: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:eslint-comments/recommended", | ||
"plugin:n/recommended", | ||
"plugin:perfectionist/recommended-natural", | ||
"plugin:regexp/recommended", | ||
"plugin:vitest/recommended", | ||
], | ||
overrides: [ | ||
{ | ||
extends: ["plugin:markdown/recommended"], | ||
files: ["**/*.md"], | ||
processor: "markdown/markdown", | ||
}, | ||
{ | ||
extends: [ | ||
"plugin:jsdoc/recommended-typescript-error", | ||
"plugin:@typescript-eslint/strict", | ||
"plugin:@typescript-eslint/stylistic", | ||
], | ||
files: ["**/*.ts"], | ||
parser: "@typescript-eslint/parser", | ||
rules: { | ||
// These off-by-default rules work well for this repo and we like them on. | ||
"jsdoc/informative-docs": "error", | ||
"logical-assignment-operators": [ | ||
"error", | ||
"always", | ||
{ enforceForIfStatements: true }, | ||
], | ||
"operator-assignment": "error", | ||
|
||
// These on-by-default rules don't work well for this repo and we like them off. | ||
"jsdoc/require-jsdoc": "off", | ||
"jsdoc/require-param": "off", | ||
"jsdoc/require-property": "off", | ||
"jsdoc/require-returns": "off", | ||
}, | ||
}, | ||
{ | ||
files: "**/*.md/*.*s", | ||
rules: { | ||
"n/no-missing-import": [ | ||
"error", | ||
{ allowModules: ["console-fail-test", "vitest"] }, | ||
], | ||
"n/no-missing-require": [ | ||
"error", | ||
{ | ||
allowModules: [ | ||
"@hapi/lab", | ||
"ava", | ||
"console-fail-test", | ||
"sinon", | ||
"tap", | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
{ | ||
excludedFiles: ["**/*.md/*.ts"], | ||
extends: [ | ||
"plugin:@typescript-eslint/strict-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked", | ||
], | ||
files: ["**/*.ts"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: "./tsconfig.eslint.json", | ||
}, | ||
rules: { | ||
// These off-by-default rules work well for this repo and we like them on. | ||
"deprecation/deprecation": "error", | ||
|
||
// TODO | ||
"@typescript-eslint/ban-types": "off", | ||
"@typescript-eslint/no-confusing-void-expression": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-redundant-type-constituents": "off", | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/restrict-template-expressions": "off", | ||
"@typescript-eslint/unbound-method": "off", | ||
}, | ||
}, | ||
{ | ||
excludedFiles: ["package.json"], | ||
extends: ["plugin:jsonc/recommended-with-json"], | ||
files: ["*.json", "*.jsonc"], | ||
parser: "jsonc-eslint-parser", | ||
rules: { | ||
"jsonc/sort-keys": "error", | ||
}, | ||
}, | ||
{ | ||
files: ["*.jsonc"], | ||
rules: { | ||
"jsonc/no-comments": "off", | ||
}, | ||
}, | ||
{ | ||
files: "**/*.test.ts", | ||
rules: { | ||
// These on-by-default rules aren't useful in test files. | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
}, | ||
}, | ||
{ | ||
extends: ["plugin:yml/standard", "plugin:yml/prettier"], | ||
files: ["**/*.{yml,yaml}"], | ||
parser: "yaml-eslint-parser", | ||
rules: { | ||
"yml/file-extension": ["error", { extension: "yml" }], | ||
"yml/sort-keys": [ | ||
"error", | ||
{ | ||
order: { type: "asc" }, | ||
pathPattern: "^.*$", | ||
}, | ||
], | ||
"yml/sort-sequence-values": [ | ||
"error", | ||
{ | ||
order: { type: "asc" }, | ||
pathPattern: "^.*$", | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
parser: "@typescript-eslint/parser", | ||
plugins: [ | ||
"@typescript-eslint", | ||
"deprecation", | ||
"jsdoc", | ||
"no-only-tests", | ||
"perfectionist", | ||
"regexp", | ||
"vitest", | ||
], | ||
reportUnusedDisableDirectives: true, | ||
root: true, | ||
rules: { | ||
// These off/less-strict-by-default rules work well for this repo and we like them on. | ||
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }], | ||
"no-only-tests/no-only-tests": "error", | ||
|
||
// These on-by-default rules don't work well for this repo and we like them off. | ||
"n/no-missing-import": "off", | ||
"no-case-declarations": "off", | ||
"no-constant-condition": "off", | ||
"no-inner-declarations": "off", | ||
"no-mixed-spaces-and-tabs": "off", | ||
"no-undef": "off", | ||
|
||
// Stylistic concerns that don't interfere with Prettier | ||
"@typescript-eslint/padding-line-between-statements": [ | ||
"error", | ||
{ blankLine: "always", next: "*", prev: "block-like" }, | ||
], | ||
"no-useless-rename": "error", | ||
"object-shorthand": "error", | ||
"perfectionist/sort-objects": [ | ||
"error", | ||
{ | ||
order: "asc", | ||
"partition-by-comment": true, | ||
type: "natural", | ||
}, | ||
], | ||
}, | ||
}; |
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
Oops, something went wrong.