Skip to content

Commit

Permalink
chore: set up standalone repository ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Feb 4, 2024
1 parent e3d9657 commit 405eeb9
Show file tree
Hide file tree
Showing 46 changed files with 6,201 additions and 340 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
quote_type = single
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
jest.config.js
fixtures
coverage
__snapshots__
build
70 changes: 70 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// @ts-check
module.exports = {
root: true,
plugins: [
'@typescript-eslint',
'deprecation',
'eslint-comments',
'eslint-plugin',
'jest',
'jsdoc',
'simple-import-sort',
'unicorn',
],
env: {
es2020: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:eslint-comments/recommended',
'plugin:eslint-plugin/recommended',
'plugin:jsdoc/recommended-typescript-error',
'plugin:@typescript-eslint/strict-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
],
parserOptions: {
project: 'tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
rules: {
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', disallowTypeAnnotations: true },
],
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowIIFEs: true },
],
'deprecation/deprecation': 'error',

// https://github.com/gajus/eslint-plugin-jsdoc/issues/1169
'jsdoc/check-param-names': 'off',
// https://github.com/gajus/eslint-plugin-jsdoc/issues/1175
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-yields': 'off',
'jsdoc/tag-lines': 'off',

'simple-import-sort/imports': 'error',
},
overrides: [
{
files: ['*.js'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: {
'deprecation/deprecation': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
// all test files
{
extends: ['plugin:jest/recommended'],
files: ['./tests/**/*'],
env: {
'jest/globals': true,
},
},
],
};
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* text=auto
*.js eol=lf
*.json eol=lf
*.md eol=lf
*.ts eol=lf
*.tsx eol=lf
*.yml eol=lf

# force github to treat out custom jest snapshot extension as normal jest snapshots
*.shot linguist-language=Jest-Snapshot
*.shot linguist-generated
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: typescript-eslint
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- Note: Please must use one of our issue templates to file an issue! 🛑 -->
<!-- 👉 https://github.com/typescript-eslint/eslint-plugin-tslint/issues/new/choose 👈 -->
<!-- **Issues that should have been filed with a template will be closed without action, and we will ask you to use a template.** -->

<!-- This blank issue template is only for issues that don't fit any of the templates. -->

## Overview

...
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/01-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/eslint-plugin-tslint/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
description: What did you expect to happen?
label: Expected
type: textarea
validations:
required: true
- attributes:
description: What happened instead?
label: Actual
type: textarea
validations:
required: true
- attributes:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea
description: Report a bug trying to run the code
labels:
- 'type: bug'
name: 🐛 Bug
title: '🐛 Bug: <short description of the bug>'
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/02-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/eslint-plugin-tslint/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
description: What would you like to report?
label: Overview
type: textarea
validations:
required: true
- attributes:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea
description: Report a typo or missing area of documentation
labels:
- 'area: documentation'
name: 📝 Documentation
title: '📝 Documentation: <short description of the request>'
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/03-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Bug Report Checklist
options:
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/eslint-plugin-tslint/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
description: What did you expect to be able to do?
label: Overview
type: textarea
validations:
required: true
- attributes:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea
description: Request that a new feature be added or an existing feature improved
labels:
- 'type: feature'
name: 🚀 Feature
title: '🚀 Feature: <short description of the feature>'
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/04-tooling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
body:
- attributes:
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
label: Tooling Request Checklist
options:
- label: I have tried restarting my IDE and the issue persists.
required: true
- label: I have pulled the latest `main` branch of the repository.
required: true
- label: I have [searched for related issues](https://github.com/typescript-eslint/eslint-plugin-tslint/issues?q=is%3Aissue) and found none that matched my issue.
required: true
type: checkboxes
- attributes:
description: What did you expect to be able to do?
label: Overview
type: textarea
validations:
required: true
- attributes:
description: Any additional info you'd like to provide.
label: Additional Info
type: textarea
description: Report a bug or request an enhancement in repository tooling
labels:
- 'area: tooling'
name: 🛠 Tooling
title: '🛠 Tooling: <short description of the change>'
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- 👋 Hi, thanks for sending a PR to eslint-plugin-tslint! 💖.
Please fill out all fields below and make sure each item is true and [x] checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [ ] Addresses an existing open issue: fixes #000
- [ ] That issue was marked as [`status: accepting prs`](https://github.com/typescript-eslineslint-plugin-tslintt/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslineslint-plugin-tslintt/blob/main/.github/CONTRIBUTING.md) were taken

## Overview

<!-- Description of what is changed and how the code change does that. -->
12 changes: 12 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Security Policy

The typescript-eslint team and community take all security vulnerabilities seriously.
If you have a vulnerability or other security issues to disclose:

- Thank you very much, please do!
- Please send them to us by emailing `typescripteslint@gmail.com`

We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.

> We also adhere to the [Tidelift security process](https://support.tidelift.com/hc/en-us/articles/4406287910036-Security-process).
> See https://tidelift.com/security.
13 changes: 13 additions & 0 deletions .github/actions/prepare/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Prepares the repo for a typical CI job

name: Prepare

runs:
steps:
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: '20'
- run: yarn install --frozen-lockfile
shell: bash
using: composite
70 changes: 70 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
enabledManagers: ['github-actions', 'npm'],
ignoreDeps: [
// AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70
'ajv',
// globby is ESM so we can't go any higher right now
'globby',
// this dep is now ESM only
'execa',
],
internalChecksFilter: 'strict',
labels: ['dependencies'],
dependencyDashboard: true,
dependencyDashboardLabels: ['dependencies', 'repo maintenance'],
major: {
// most majors will require some manual effort to upgrade to, so we don't want to create
// PRs automatically or else we'll just spam ourselves.
dependencyDashboardApproval: true,
},
// by default renovate will auto-rebase whenever the dep pranch falls behind main.
// this is annoying as it spams notifications and creates unnecessary action runs.
// instead only auto-rebase when conflicted, and we can trigger a manual rebase if required.
rebaseWhen: 'conflicted',
packageRules: [
// automerge everything but major updates
{
matchUpdateTypes: ['minor', 'patch', 'pin', 'digest'],
automerge: true,
automergeStrategy: 'squash',
},

// label PRs appropriately
{
matchManagers: ['npm'],
addLabels: ['javascript'],
},
{
matchManagers: ['github-actions'],
addLabels: ['github-actions'],
},

// batch package sets together
{
extends: ['packages:react'],
groupName: 'react',
},
{
extends: ['monorepo:docusaurus'],
groupName: 'docusaurus',
},
{
extends: ['monorepo:nrwl'],
groupName: 'nx',
},
{
matchPackagePrefixes: ['@babel', 'babel-'],
groupName: 'babel',
},
{
matchPackageNames: ['ts-jest', 'pretty-format'],
matchPackagePrefixes: ['@types/jest', 'jest', '@jest'],
groupName: 'jest',
},
],
postUpdateOptions: [
// run yarn dedupe to cleanup the lockfile after updates
'yarnDedupeHighest',
],
stabilityDays: 3,
}
25 changes: 25 additions & 0 deletions .github/workflows/accessibility-alt-text-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
jobs:
accessibility_alt_text_bot:
runs-on: ubuntu-latest
steps:
- uses: github/accessibility-alt-text-bot@v1.4.0

name: Accessibility Alt Text Bot

on:
issue_comment:
types:
- created
- edited
issues:
types:
- edited
- opened
pull_request:
types:
- edited
- opened

permissions:
issues: write
pull-requests: write
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: yarn build
- run: node ./lib/index.js

name: Build

on:
pull_request: ~
push:
branches:
- main
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: yarn build || true
- run: yarn lint

name: Lint

on:
pull_request: ~
push:
branches:
- main

0 comments on commit 405eeb9

Please sign in to comment.