Skip to content

Commit

Permalink
feat(eslint-plugin): rework configs: recommended, strict, stylistic; …
Browse files Browse the repository at this point in the history
…-type-checked (#5251)

* feat\!: include lesser configs in recommended/strict

* Instead of nested includes, just go with flat

* Fix configs test too

* fix(utils): removed `TRuleListener` generic from the `createRule` (#5036)

* refactor(utils)!: removed `TRuleListener` generic from the `createRule`

* refactor!: removed `TRuleListener` generic from the `CLIEngine` and `RuleCreateFunction`

* chore: document and refactor 'extra' to 'parserSettings' (#5834)

* chore(website): fix renamed Sponsorship docs link (#5882)

* docs: Mention wide globs performance implications in monorepos docs and parser README (#5864)

* docs: Mention wide globs performance implications in monorepos docs and parser readme

* Update docs/linting/typed-linting/MONOREPOS.md

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
Co-authored-by: Adnan Hashmi <56730784+adnanhashmi09@users.noreply.github.com>

* feat: create TSTypeQuery node when TSImportType has isTypeOf (#3076)

* feat: update TSImportType node

* fix: update visitor keys

* chore: document and refactor 'extra' to 'parserSettings' (#5834)

* chore(website): fix renamed Sponsorship docs link (#5882)

* docs: Mention wide globs performance implications in monorepos docs and parser README (#5864)

* docs: Mention wide globs performance implications in monorepos docs and parser readme

* Update docs/linting/typed-linting/MONOREPOS.md

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
Co-authored-by: Adnan Hashmi <56730784+adnanhashmi09@users.noreply.github.com>

* feat(scope-manager): ignore ECMA version (#5889)

* feat(scope-manager): ignore ECMA version

* chore: document and refactor 'extra' to 'parserSettings' (#5834)

* chore(website): fix renamed Sponsorship docs link (#5882)

* Remove much more

* Fix WebLinter lint

* docs: Mention wide globs performance implications in monorepos docs and parser README (#5864)

* docs: Mention wide globs performance implications in monorepos docs and parser readme

* Update docs/linting/typed-linting/MONOREPOS.md

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>

* chore: add auto-canary release for v6 (#5883)

Co-authored-by: Adnan Hashmi <56730784+adnanhashmi09@users.noreply.github.com>

* feat: remove semantically invalid properties from TSEnumDeclaration, TSInterfaceDeclaration and TSModuleDeclaration (#4863)

* chore: remove invalid properties from ast nodes

* chore: remove invalid code in scope-manager and typescript-estree

* chore: re-write snapshots that were using invalid properties

* feat: remove modifiers union from ast types

Co-authored-by: Juan García <juank1809@gmail.com>
Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>

* fix(eslint-plugin): remove valid-typeof disable in eslint-recommended (#5381)

* feat(utils): remove (ts-)eslint-scope types (#5256)

* chore(utils)\!: remove (ts-)eslint-scope types

* Remove eslint-scope dep

* More file deletions

* fix(eslint-plugin): [explicit-module-boundary-types] remove shouldTrackReferences option from schema (#5399)

* Enabled base config

* The script runs now

* Upgraded ts-node to avoid bug

* Updated configuration docs

* Updated configs exports

* Updated generation script

* Revert CHANGELOG.md change

* Switch to ts-node/esm loader

* Fix post-merge type failure

* pin ts-node to 10.9.0

* Switch to tsx for all but Docusaurus

* Fix post-merge generate-breaking-changes issues

* Switched generation to explicitly include lesser rules

* Include recommended in strict

* More granular caching in prepare-install/action.yml

* Fix type checking issues with generate-configs.mts

* Adjusted docs, tests, and RulesTable

* Adjusted rule docs pages and more RulesTable fixes

* Swap 💅 to 🎨

* pin ts-node to 10.7.0

* Fix docs post-merge artifact

* Err, mostly or completely fix

* prefer-reduce-type-parameter back to strict; fix other complaints

* Put integration test back

* Start updating the snapshot

* More snapshot correction

* Put no-unused-vars in recommended

* Fix root config to always error; remove unneeded no-unused-vars

* Some more linting

* Undo action.yml changes

* Added todo

* Fix no-extra-semi.ts and configs.test.ts

* Merge branch 'v6'

* Update packages/eslint-plugin/tools/generate-configs.mts

Co-authored-by: Brad Zacher <brad.zacher@gmail.com>

* Last few review fixups

* lil 'a' typo

* No more .mts needed

* Adjust eslint-plugin/tools/generate files to build

* Fix casing

* ...and extensions

* git mv for casing

* Simplify old recommended-requiring-type-checking include; delete file

---------

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Adnan Hashmi <56730784+adnanhashmi09@users.noreply.github.com>
Co-authored-by: Armano <armano2@users.noreply.github.com>
Co-authored-by: Juan García <82288753+juank1809@users.noreply.github.com>
Co-authored-by: Juan García <juank1809@gmail.com>
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
  • Loading branch information
7 people committed Feb 15, 2023
1 parent 3915661 commit 5346b5b
Show file tree
Hide file tree
Showing 150 changed files with 1,038 additions and 813 deletions.
18 changes: 9 additions & 9 deletions .eslintrc.js
Expand Up @@ -17,8 +17,8 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:eslint-plugin/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/recommended-type-checked',
// TODO: consider enabling strict-type-checked and/or stylistic-type-checked
],
parserOptions: {
sourceType: 'module',
Expand Down Expand Up @@ -94,7 +94,7 @@ module.exports = {
},
],
'@typescript-eslint/no-unused-vars': [
'warn',
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],

Expand Down Expand Up @@ -122,7 +122,7 @@ module.exports = {
'no-console': 'error',
'no-process-exit': 'error',
'no-fallthrough': [
'warn',
'error',
{ commentPattern: '.*intentional fallthrough.*' },
],

Expand Down Expand Up @@ -223,17 +223,17 @@ module.exports = {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'eslint-plugin/consistent-output': 'off', // Might eventually be removed from `eslint-plugin/recommended`: https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/284
'jest/no-disabled-tests': 'warn',
'jest/no-disabled-tests': 'error',
'jest/no-focused-tests': 'error',
'jest/no-alias-methods': 'error',
'jest/no-identical-title': 'error',
'jest/no-jasmine-globals': 'error',
'jest/no-test-prefixes': 'error',
'jest/no-done-callback': 'error',
'jest/no-test-return-statement': 'error',
'jest/prefer-to-be': 'warn',
'jest/prefer-to-contain': 'warn',
'jest/prefer-to-have-length': 'warn',
'jest/prefer-to-be': 'error',
'jest/prefer-to-contain': 'error',
'jest/prefer-to-have-length': 'error',
'jest/prefer-spy-on': 'error',
'jest/valid-expect': 'error',
'jest/no-deprecated-functions': 'error',
Expand Down Expand Up @@ -312,7 +312,7 @@ module.exports = {
},
// tools and tests
{
files: ['**/tools/**/*.ts', '**/tests/**/*.ts'],
files: ['**/tools/**/*.*t*', '**/tests/**/*.ts'],
rules: {
// allow console logs in tools and tests
'no-console': 'off',
Expand Down
2 changes: 0 additions & 2 deletions docs/Custom_Rules.mdx
Expand Up @@ -63,7 +63,6 @@ export const rule = createRule({
docs: {
description:
'Function declaration names should start with an upper-case letter.',
recommended: 'warn',
},
messages: {
uppercase: 'Start this name with an upper-case letter.',
Expand Down Expand Up @@ -256,7 +255,6 @@ export const rule = createRule({
meta: {
docs: {
description: 'Avoid looping over enums.',
recommended: 'error',
},
messages: {
loopOverEnum: 'Do not loop over enums.',
Expand Down
141 changes: 0 additions & 141 deletions docs/linting/CONFIGURATIONS.mdx

This file was deleted.

0 comments on commit 5346b5b

Please sign in to comment.