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

build: onboarded to create-typescript-app (mostly) #55

Merged
merged 8 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"badgeTemplate": "<img alt=\"All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg\" />",
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "JoshuaKGoldberg",
"name": "Josh Goldberg ✨",
"avatar_url": "https://avatars.githubusercontent.com/u/3335181?v=4",
"profile": "http://www.joshuakgoldberg.com/",
"contributions": [
"code",
"doc",
"maintenance",
"projectManagement",
"tool"
]
},
{
"login": "dmnd",
"name": "Desmond Brand",
"avatar_url": "https://avatars.githubusercontent.com/u/4427?v=4",
"profile": "https://synthesis.com/",
"contributions": [
"bug",
"code",
"doc",
"maintenance",
"projectManagement",
"tool"
]
},
{
"login": "G-Rath",
"name": "Gareth Jones",
"avatar_url": "https://avatars.githubusercontent.com/u/3151613?v=4",
"profile": "https://github.com/G-Rath",
"contributions": ["code"]
},
{
"login": "jlarmstrongiv",
"name": "John L. Armstrong IV",
"avatar_url": "https://avatars.githubusercontent.com/u/20903247?v=4",
"profile": "https://github.com/jlarmstrongiv",
"contributions": ["bug"]
},
{
"login": "cometkim",
"name": "Hyeseong Kim",
"avatar_url": "https://avatars.githubusercontent.com/u/9696352?v=4",
"profile": "https://blog.cometkim.kr/",
"contributions": ["tool"]
},
{
"login": "adrianjost",
"name": "Adrian Jost",
"avatar_url": "https://avatars.githubusercontent.com/u/22987140?v=4",
"profile": "https://adrianjost.dev/",
"contributions": ["code"]
},
{
"login": "Haroenv",
"name": "Haroen Viaene",
"avatar_url": "https://avatars.githubusercontent.com/u/6270048?v=4",
"profile": "https://haroen.me/",
"contributions": ["code"]
},
{
"login": "phenomnomnominal",
"name": "Craig Spence",
"avatar_url": "https://avatars.githubusercontent.com/u/1086286?v=4",
"profile": "https://github.com/phenomnomnominal",
"contributions": ["code", "bug", "doc"]
},
{
"login": "pratapvardhan",
"name": "Pratap Vardhan",
"avatar_url": "https://avatars.githubusercontent.com/u/3757165?v=4",
"profile": "https://pratapvardhan.com/",
"contributions": ["bug", "code"]
}
],
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"files": ["README.md"],
"imageSize": 100,
"projectName": "dedent",
"projectOwner": "dmnd",
"repoHost": "https://github.com",
"repoType": "github"
}
88 changes: 44 additions & 44 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"env": {
"legacy": {
"plugins": [["add-module-exports", { "addDefaultProperty": true }]],
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": 10
}
}
]
]
},
"modern": {
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": false,
"bugfixes": true,
"targets": {
"esmodules": true
}
}
]
]
}
},
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": "current"
}
}
]
]
"env": {
"legacy": {
"plugins": [["add-module-exports", { "addDefaultProperty": true }]],
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": 10
}
}
]
]
},
"modern": {
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": false,
"bugfixes": true,
"targets": {
"esmodules": true
}
}
]
]
}
},
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": "current"
}
}
]
]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist/
pnpm-lock.yaml

# https://github.com/dmnd/dedent/issues/52
macro.js
153 changes: 143 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,146 @@
/* eslint-env node */
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
env: {
es2022: true,
},
extends: [
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:n/recommended",
"plugin:perfectionist/recommended-natural",
"plugin:regexp/recommended",
"prettier",
],
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",

// 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",
},
},
{
excludedFiles: ["**/*.md/*.ts"],
extends: [
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
files: ["**/*.ts"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
rules: {
// These off-by-default rules work well for this repo and we like them on.
"deprecation/deprecation": "error",

// These more-strict-by-default rules don't work well for this repo and we like them less strict.
"@typescript-eslint/no-unnecessary-condition": [
"error",
{
allowConstantLoopConditions: true,
},
],
},
},
{
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",
"jest",
"jsdoc",
"no-only-tests",
"perfectionist",
"regexp",
],
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",

// Stylistic concerns that don't interfere with Prettier
"@typescript-eslint/padding-line-between-statements": [
"error",
{ blankLine: "always", next: "*", prev: "block-like" },
],
"perfectionist/sort-objects": [
"error",
{
order: "asc",
"partition-by-comment": true,
type: "natural",
},
],
},
};
10 changes: 0 additions & 10 deletions .flowconfig

This file was deleted.

Loading