Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: onboard to create-typescript-app with pnpm support #1435

Merged
merged 14 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
93 changes: 93 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"badgeTemplate": "\t<a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
"commit": false,
"commitConvention": "angular",
"commitType": "docs",
"contributors": [
{
"login": "beyang",
"name": "Beyang Liu",
"avatar_url": "https://avatars.githubusercontent.com/u/1646931?v=4",
"profile": "https://sourcegraph.com/",
"contributions": ["code"]
},
{
"login": "bitsnaps",
"name": "Ibrahim H.",
"avatar_url": "https://avatars.githubusercontent.com/u/1217741?v=4",
"profile": "https://stackoverflow.com/users/5494094/ibrahim-h",
"contributions": ["code"]
},
{
"login": "danstiner",
"name": "Daniel Stiner",
"avatar_url": "https://avatars.githubusercontent.com/u/52513?v=4",
"profile": "https://danstiner.me/",
"contributions": ["bug"]
},
{
"login": "emday4prez",
"name": "Emerson",
"avatar_url": "https://avatars.githubusercontent.com/u/35363144?v=4",
"profile": "https://github.com/emday4prez",
"contributions": ["code"]
},
{
"login": "ghost",
"name": "Deleted user",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"profile": "https://github.com/ghost",
"contributions": ["maintenance"]
},
{
"login": "girishsontakke",
"name": "Girish Sontakke",
"avatar_url": "https://avatars.githubusercontent.com/u/61848210?v=4",
"profile": "https://girish.netlify.app/",
"contributions": ["code"]
},
{
"login": "gutenye",
"name": "Guten",
"avatar_url": "https://avatars.githubusercontent.com/u/377544?v=4",
"profile": "https://maps.guten.me/",
"contributions": ["bug"]
},
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com/",
"contributions": ["maintenance", "bug", "tool", "code", "infra", "doc"]
},
{
"login": "markjm",
"name": "Mark Molinaro",
"avatar_url": "https://avatars.githubusercontent.com/u/16494982?v=4",
"profile": "https://www.linkedin.com/in/markjm-1/",
"contributions": ["bug", "code"]
},
{
"login": "micrology",
"name": "Nigel Gilbert",
"avatar_url": "https://avatars.githubusercontent.com/u/1449986?v=4",
"profile": "https://cress.soc.surrey.ac.uk/web/people/ngilbert",
"contributions": ["bug"]
},
{
"login": "orionna319",
"name": "orionna319",
"avatar_url": "https://avatars.githubusercontent.com/u/85230052?v=4",
"profile": "https://orionna.me/",
"contributions": ["bug"]
}
],
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"files": ["README.md"],
"imageSize": 100,
"projectName": "TypeStat",
"projectOwner": "JoshuaKGoldberg",
"repoHost": "https://github.com",
"repoType": "github"
}
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

176 changes: 176 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/** @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",
],
ignorePatterns: [
"!.*",
"coverage",
"lib",
"node_modules",
"test/cases",
"pnpm-lock.yaml",
],
overrides: [
{
extends: ["plugin:markdown/recommended-legacy"],
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",
"no-undef": "error",
},
},
{
files: "**/*.md/*.ts",
rules: {
"n/no-missing-import": ["error", { allowModules: ["TypeStat"] }],
},
},
{
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",

// These too-strict-by-default rules work well for this repo, once configured.
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
},
],
},
},
{
excludedFiles: ["package.json"],
extends: ["plugin:jsonc/recommended-with-json"],
files: ["*.json", "*.jsonc"],
parser: "jsonc-eslint-parser",
rules: {
"jsonc/comma-dangle": "off",
"jsonc/sort-keys": "error",
},
},
{
files: ["*.jsonc"],
rules: {
"jsonc/no-comments": "off",
},
},
{
extends: ["plugin:package-json/recommended"],
files: ["package.json"],
parser: "jsonc-eslint-parser",
plugins: ["package-json"],
},
{
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",
"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-undef": "off",

// These on-by-default rules don't work well for this repo and we like them off.
"no-case-declarations": "off",
"no-constant-condition": "off",
"no-inner-declarations": "off",
"no-mixed-spaces-and-tabs": "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",
},
],
},
};
13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

Loading
Loading