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

chore: v6.0.0 #5886

Merged
merged 179 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
361f8bc
fix(utils): removed `TRuleListener` generic from the `createRule` (#5…
Andarist Oct 25, 2022
2b69b65
feat: create TSTypeQuery node when TSImportType has isTypeOf (#3076)
armano2 Oct 26, 2022
f2330f7
feat(scope-manager): ignore ECMA version (#5889)
JoshuaKGoldberg Oct 26, 2022
844875c
feat: remove semantically invalid properties from TSEnumDeclaration, …
juank1809 Oct 26, 2022
b82df5e
fix(eslint-plugin): remove valid-typeof disable in eslint-recommended…
JoshuaKGoldberg Oct 26, 2022
df54175
feat(utils): remove (ts-)eslint-scope types (#5256)
JoshuaKGoldberg Oct 26, 2022
6d32734
fix(eslint-plugin): [explicit-module-boundary-types] remove shouldTra…
JoshuaKGoldberg Oct 26, 2022
426d6b6
feat(typescript-estree): deprecate createDefaultProgram (#5890)
JoshuaKGoldberg Oct 27, 2022
7e3fe9a
feat: drop support for node v12 (#5918)
bradzacher Nov 2, 2022
a8e71d5
feat: bump minimum supported TS version to 4.2.4 (#5915)
bradzacher Nov 7, 2022
f424b2a
feat(utils): remove obsolete `meta.docs.suggestion` rule type (#5967)
bmish Nov 11, 2022
cc62015
chore: drop support for node v14.17, v17 (#5971)
bmish Nov 11, 2022
2a5e20f
feat: raise tsconfig target to ES2021 (#5981)
bmish Nov 13, 2022
bda806d
feat: drop support for ESLint v6 (#5972)
bmish Nov 14, 2022
af41b7f
feat(typescript-estree): allow providing code as a ts.SourceFile (#5892)
JoshuaKGoldberg Nov 16, 2022
4bdbe67
feat(eslint-plugin): [prefer-nullish-coalescing]: add support for ass…
JoshuaKGoldberg Nov 16, 2022
36dc7ce
chore: removed eslint@6 fallbacks for rule messages, and a snapshot (…
JoshuaKGoldberg Nov 19, 2022
9851338
chore: fix bad rebase
bradzacher Nov 23, 2022
a4768f3
feat: made BaseNode.parent non-optional (#5252)
JoshuaKGoldberg Nov 25, 2022
e9aafbf
Merge branch 'main' into v6
JoshuaKGoldberg Nov 27, 2022
0b7476b
feat(experimental-utils): console.warn on import of experimental-util…
kball Dec 8, 2022
47eeea9
chore(eslint-plugin): remove deprecated rules for v6 (#6112)
JoshuaKGoldberg Dec 8, 2022
4c28ef7
Merge branch 'main'
JoshuaKGoldberg Dec 11, 2022
307a457
Merge branch 'main' into v6
JoshuaKGoldberg Dec 16, 2022
f1e805e
post-merge fix: rules sorting; sort-type-union-intersection-members r…
JoshuaKGoldberg Dec 16, 2022
ca317f6
continue deletion of test file
JoshuaKGoldberg Dec 16, 2022
dde6861
Fix another post-merge artifact: ESLint versioning
JoshuaKGoldberg Dec 18, 2022
7fc062a
feat: remove partial type-information program (#6066)
bradzacher Jan 23, 2023
07d8034
Merge branch 'main'
JoshuaKGoldberg Jan 23, 2023
c8c0a14
typecheck fixes
JoshuaKGoldberg Jan 23, 2023
4528b8d
chore(typescript-estree): remove unnecessary this.inTypeMode field (#…
bradzacher Jan 25, 2023
820bdf2
feat(eslint-plugin): deprecate no-type-alias (#6229)
JoshuaKGoldberg Jan 30, 2023
fde95d3
chore(typescript-estree): remove visitor-keys backwards compat export…
JoshuaKGoldberg Jan 30, 2023
9c17395
Merge branch 'main'
JoshuaKGoldberg Feb 4, 2023
1c3f470
fix(typescript-estree): wrap import = declaration in an export node (…
JoshuaKGoldberg Feb 4, 2023
62d5755
feat(typescript-estree): add type checker wrapper APIs to ParserServi…
JoshuaKGoldberg Feb 5, 2023
79327b4
fix: replace tsutils with ts-api-tools (#6428)
JoshuaKGoldberg Feb 6, 2023
5d9b254
Merge branch 'main'
JoshuaKGoldberg Feb 10, 2023
c1368f2
Deleted post-merge should-be-deleted test files
JoshuaKGoldberg Feb 10, 2023
71761a2
Merge branch 'main' into v6
bradzacher Feb 13, 2023
d50942c
chore: remove unnecessary old fixtures/snapshots
bradzacher Feb 13, 2023
3915661
feat: bump ts-api-utils to v0.0.21 (#6459)
bradzacher Feb 13, 2023
5346b5b
feat(eslint-plugin): rework configs: recommended, strict, stylistic; …
JoshuaKGoldberg Feb 15, 2023
71adbc5
feat: remove `experimental-utils` (#6468)
bradzacher Feb 15, 2023
aa20f63
fix(ast-spec): remove more invalid properties (#6243)
JoshuaKGoldberg Feb 15, 2023
3b063cf
feat(eslint-plugin): add config that disables type-aware linting (#6470)
bradzacher Feb 15, 2023
9dbacd8
chore: update downlevel-dts config to target TS4.2 (#6471)
bradzacher Feb 15, 2023
cd26357
Merge branch 'main' into v6
bradzacher Feb 15, 2023
b88cd23
feat: bump ts-api-utils to v0.0.22 (#6472)
bradzacher Feb 15, 2023
98dec37
chore: cleanup repo lint + typechecking (#6473)
bradzacher Feb 16, 2023
ff6b190
test: allow to execute tests on windows (#6488)
armano2 Feb 18, 2023
09e3877
fix(typescript-estree): account for namespace nesting in AST conversi…
JoshuaKGoldberg Feb 21, 2023
1a843b7
Merge branch 'main'
JoshuaKGoldberg Feb 21, 2023
7fde964
Merge branch 'main' into v6
JoshuaKGoldberg Feb 21, 2023
6139e17
Remove react-hooks/exhaustive-deps disable
JoshuaKGoldberg Feb 21, 2023
593e647
Correct import from tsutils to ts-api-utils
JoshuaKGoldberg Feb 21, 2023
a00d916
Missed a lint
JoshuaKGoldberg Feb 21, 2023
fc2df63
Merge branch 'main' into v6
bradzacher Feb 21, 2023
d676683
feat: add package.json exports for public packages (#6458)
bradzacher Feb 22, 2023
217c710
fix: bumped ts-api-utils to 0.0.39 (#6497)
JoshuaKGoldberg Feb 23, 2023
08d757b
fix: rename typeParameters to typeArguments where needed (#5384)
JoshuaKGoldberg Feb 23, 2023
d385d29
Fix: remove unnecessary eslint line
JoshuaKGoldberg Feb 23, 2023
cbb8fed
Really fix eslint issues in convert.ts...
JoshuaKGoldberg Feb 23, 2023
df131e2
feat(typescript-estree): remove optionality from AST boolean properti…
JoshuaKGoldberg Feb 24, 2023
35be101
chore: remove no-longer-necessary ts-api-utils package patch (#6526)
JoshuaKGoldberg Feb 25, 2023
ff680bb
test(ast-spec): snapshot codeframe of error (#6555)
fisker Mar 2, 2023
f98afd2
chore: fix build errors
bradzacher Mar 2, 2023
a3b177d
feat(typescript-estree): added allowInvalidAST option to not throw on…
JoshuaKGoldberg Mar 5, 2023
994123a
chore: turn on array-type lint rule
bradzacher Mar 6, 2023
f880e59
Merge branch 'main' into v6
bradzacher Mar 6, 2023
53776c2
fix: update `exports` field in package.json files (#6550)
fisker Mar 6, 2023
355adf0
feat: improve error location (#6556)
fisker Mar 6, 2023
f652ffa
chore: fix bad main merge
bradzacher Mar 8, 2023
c562e18
Merge branch 'main' into v6
bradzacher Mar 8, 2023
67e05c8
feat(typescript-estree): throw errors on interface with implements (#…
fisker Mar 8, 2023
530185b
feat(typescript-estree): strict class heritage clauses check (#6576)
fisker Mar 8, 2023
1b39cfd
feat(typescript-estree): check for illegal decorators on function dec…
fisker Mar 13, 2023
1d78576
feat(typescript-estree): throw errors for object methods without func…
fisker Mar 13, 2023
e8cdd5c
fix(typescript-estree): fix error handling on `ImportExpression` (#6587)
fisker Mar 13, 2023
f0f45a9
feat: remove moduleResolver API (#6609)
bradzacher Mar 13, 2023
79c058d
feat(typescript-estree): warn on deprecated AST property accesses (#6…
JoshuaKGoldberg Mar 13, 2023
bd273dd
Merge branch 'main'
JoshuaKGoldberg Mar 13, 2023
92908bd
fix(eslint-plugin): allow parser@^6.0.0 (#6630)
JoshuaKGoldberg Mar 14, 2023
6397be8
Merge branch 'main' into v6
bradzacher Mar 14, 2023
6586d98
chore: fix bad merge
bradzacher Mar 15, 2023
cf893b7
chore: add back parser errors removed in last merge
bradzacher Mar 15, 2023
1b22295
chore: fix build
bradzacher Mar 15, 2023
d864691
chore: tweak CI a bit to reduce unnecessary rebuilds
bradzacher Mar 15, 2023
957bdcb
Merge branch 'main' into v6
bradzacher Mar 15, 2023
62d6230
feat(typescript-estree): check modifiers on every node (#6615)
fisker Mar 15, 2023
dcdbc76
feat(typescript-estree): throw errors when abstract property has init…
fisker Mar 17, 2023
28a64b5
chore: bump ts-api-utils to v0.0.44 (#6659)
bradzacher Mar 17, 2023
6652ebe
fix(typescript-estree): allow writing to deprecated node properties (…
JoshuaKGoldberg Mar 20, 2023
c9427b7
feat(eslint-plugin): [prefer-readonly-parameter-types] added an optio…
marekdedic Mar 20, 2023
d04e256
Merge branch 'main' into v6
bradzacher Mar 21, 2023
2f3638f
fix(typescript-estree): forbid `override` on non-constructor function…
fisker Mar 21, 2023
4cca58c
chore: fix incorrect minimum TS version after bad merge
bradzacher Mar 21, 2023
f84bf4a
chore(website): migrate from lzstring.ts to lz-string package (#6727)
armano2 Mar 21, 2023
5f5bde4
chore(website): [playground] regression fix for parsing comments (#6768)
armano2 Mar 27, 2023
118a409
chore(website): [playground] add tabs to ast viewer and update design…
armano2 Mar 27, 2023
45991b3
chore(website): [playground] improve design of error viewer (#6738)
armano2 Mar 27, 2023
8a2752f
chore(website): [playground] update option selector (#6736)
armano2 Mar 27, 2023
c6a3acd
chore(website): add stylelint and fix css issues (#6779)
armano2 Mar 28, 2023
2db2bfc
chore(website): [playground] drop support for typescript v3 (#6775)
armano2 Mar 29, 2023
4eb0e3a
chore(website): update build script to use esbuild instead of rollup …
armano2 Mar 30, 2023
b93458f
feat(typescript-estree): forbid members in Mapped Type (#6802)
fisker Mar 31, 2023
c4c57ec
Merge branch 'main' into v6
bradzacher Mar 31, 2023
79de27d
chore: fix bad merge
bradzacher Mar 31, 2023
7ca2c90
fix(type-utils): checking of type aliases' type names by `typeMatches…
RebeccaStevens Apr 2, 2023
0d8d9f2
chore(website): [playground] add copy as json and simplify ast viewer…
armano2 Apr 2, 2023
f83a879
chore(website): [playground] allow to choose file extensions (#6785)
armano2 Apr 2, 2023
648f6ad
chore(website): [playground] add support for extends in eslint config…
armano2 Apr 2, 2023
b4c1bfa
chore(website): add stylelint job in ci (#6800)
juank1809 Apr 3, 2023
efd6ca9
chore(website): [playground] inline visual editor instead of showing …
armano2 Apr 3, 2023
daa07ef
chore: correct v6 stylelint action error (#6837)
armano2 Apr 3, 2023
9bf8b84
fix stylelint
JoshuaKGoldberg Apr 3, 2023
4e20c98
Fix stylelint working directory
JoshuaKGoldberg Apr 3, 2023
c036fe3
chore(website): add documentation comments to various functions (#6840)
armano2 Apr 5, 2023
a35a2bb
chore(website): [playground] use languageService for linting code (#6…
armano2 Apr 7, 2023
0318f1e
chore: simplify `getLocFor` (#6733)
fisker Apr 8, 2023
e902350
Merge branch 'main' into v6
bradzacher Apr 11, 2023
2b47e31
chore: additional merge fixes
bradzacher Apr 12, 2023
277fdb5
fix: correct lint error after merge
armano2 Apr 14, 2023
5ee6180
chore(website): validate rule options in editor (#6907)
armano2 Apr 16, 2023
bffdb62
chore(website): [playground] option to disable scroll and display tok…
armano2 Apr 16, 2023
a3a55f8
Merge branch 'main' into v6
bradzacher Apr 17, 2023
d1a4b90
chore: bump minimum TS to 4.3.5 (#6923)
bradzacher Apr 17, 2023
3350940
fix(type-utils): fixed TypeOrValueSpecifier not accounting for scoped…
marekdedic Apr 17, 2023
5a14205
chore: update ts-api-utils to v46 (#6925)
bradzacher Apr 17, 2023
3225fdf
Merge branch 'main' into v6
bradzacher Apr 18, 2023
c2e3edd
chore(website): improve error handling (#6929)
armano2 Apr 18, 2023
4bc7571
chore: remove duplicated and unused dependencies (#6930)
armano2 Apr 18, 2023
acc1a43
feat: improve rule schemas, add test to validate schemas, add tooling…
bradzacher Apr 20, 2023
489c7a5
fix: correct handling of additionalProperties in object schemas (#6939)
bradzacher Apr 21, 2023
4fa871e
chore(website): correct issue with rule schema defs (#6942)
armano2 Apr 21, 2023
2946d87
chore(eslint-plugin): correct invalid documentations (#6937)
armano2 Apr 24, 2023
3e3b789
Merge branch 'main' into v6
bradzacher Apr 26, 2023
2ce1c1d
feat: add new package `rule-tester` (#6777)
bradzacher Apr 27, 2023
c33f497
feat: remove `RuleTester` in `/utils` in favour of the new `/rule-tes…
bradzacher Apr 28, 2023
832e359
chore: bump deps (#6962)
bradzacher Apr 28, 2023
fb66d33
Merge branch 'main' into v6
bradzacher May 11, 2023
778d254
fix: correct jest.mock path post merge
JoshuaKGoldberg May 13, 2023
e6235bf
feat: drop support for node v14 and test against node v20 (#7022)
bradzacher May 15, 2023
dc801d8
feat(eslint-plugin): [restrict-plus-operands] change checkCompoundAss…
JoshuaKGoldberg Jun 15, 2023
8410f99
Merge branch 'main'
JoshuaKGoldberg Jun 15, 2023
0cda559
eslint-visitor-keys@3.4.1
JoshuaKGoldberg Jun 15, 2023
76ef7a3
eslint-visitor-keys@3.4.1
JoshuaKGoldberg Jun 15, 2023
e712dce
correct eslint-visitor-keys patch name
JoshuaKGoldberg Jun 15, 2023
ee4450b
Merge branch 'main'
JoshuaKGoldberg Jun 16, 2023
da95d62
Update test snapshots
JoshuaKGoldberg Jun 16, 2023
4a3705a
Merge branch 'main' into v6
JoshuaKGoldberg Jun 16, 2023
5095d05
fix(type-utils): file variant of TypeOrValueSpecifier uses canonical …
marekdedic Jun 16, 2023
89b14f2
build: add missing use-at-your-own-risk getCanonicalFileName export
JoshuaKGoldberg Jun 16, 2023
c456f8c
fix: fix illegal decorator check (#6723)
fisker Jun 17, 2023
a4967f2
feat: fork json schema types for better compat with ESLint rule valid…
bradzacher Jun 17, 2023
c13ce0b
feat(eslint-plugin): apply final v6 changes to configs (#7110)
JoshuaKGoldberg Jun 18, 2023
b411706
build: add publishConfig.access = 'public' to rule-tester/package.json
JoshuaKGoldberg Jun 18, 2023
36b65eb
docs: remove erroneous hasFullTypeInformation .mdx reference
JoshuaKGoldberg Jun 20, 2023
371fc26
Merge branch 'main' into v6
bradzacher Jun 24, 2023
5ea887d
docs: fix broken links v6 docs (#7082)
takanome-dev Jun 24, 2023
e2a0a76
feat(typescript-estree): remove parseWithNodeMaps (#7120)
JoshuaKGoldberg Jun 24, 2023
3cdf5c9
chore: enable sort-type-constituents internally (#7028)
JoshuaKGoldberg Jun 24, 2023
42fe29f
chore: enabled stylistic-type-checked internally (#7138)
JoshuaKGoldberg Jun 30, 2023
e35c5c1
feat(eslint-plugin): final final config changes for v6 (#7157)
JoshuaKGoldberg Jul 4, 2023
c233652
Merge branch 'main'
JoshuaKGoldberg Jul 4, 2023
e99f3b3
Fix react-split-pane patching
JoshuaKGoldberg Jul 4, 2023
0f807ed
Remove unnecessary test log
JoshuaKGoldberg Jul 6, 2023
6c99c3b
Touch up JSXNamespacedName component-dashed fixture to align to docs
JoshuaKGoldberg Jul 6, 2023
aaf0cb5
Included basic for reference too
JoshuaKGoldberg Jul 6, 2023
41d68ea
ts-expect-error for #7166
JoshuaKGoldberg Jul 6, 2023
ca3fc02
Updated test snapshots
JoshuaKGoldberg Jul 7, 2023
02a37c4
feat(eslint-plugin): [prefer-optional-chain] handle cases where the f…
bradzacher Jul 7, 2023
ecb57de
fix(type-utils): treat intrinsic types as if they are from lib and ne…
RebeccaStevens Jul 7, 2023
c8bb00d
chore: updated v6 blog post for new 'final final' configs
JoshuaKGoldberg Jul 7, 2023
bccf851
Merge branch 'main'
JoshuaKGoldberg Jul 10, 2023
d2104ae
Reset prefer-nullish-coalescing.test.ts to main
JoshuaKGoldberg Jul 10, 2023
980bda3
Merge branch 'main' (I swear this had better be the last one
JoshuaKGoldberg Jul 10, 2023
64958d3
Fix: yarn generate-configs
JoshuaKGoldberg Jul 10, 2023
3201f78
Fix prefer-nullish-coalescing too
JoshuaKGoldberg Jul 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 9 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
{
"version": "0.1",
"version": "0.2",
"language": "en",
"enableFiletypes": [
"markdown",
"mdx",
"typescript",
"typescriptreact",
"javascript",
"javascriptreact"
],
"ignorePaths": [
".cspell.json",
".github/workflows/**",
Expand Down Expand Up @@ -119,7 +127,6 @@
"trpc",
"tsconfigs",
"tseslint",
"tsutils",
"tsvfs",
"typedef",
"typedefs",
Expand Down
13 changes: 6 additions & 7 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ __snapshots__
.docusaurus
build

packages/eslint-plugin-tslint/tests

packages/website/**/*.js
packages/website/**/*.d.ts
packages/website-eslint/**/*.js
packages/website-eslint/**/*.d.ts

# Files copied as part of the build
packages/types/src/generated/**/*.ts

# Playground types downloaded from the web
packages/website/src/vendor

# see the file header in eslint-base.test.js for more info
packages/rule-tester/tests/eslint-base
97 changes: 71 additions & 26 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// @ts-check
/** @type {import('./packages/utils/src/ts-eslint/Linter').Linter.Config} */
module.exports = {
root: true,
plugins: [
Expand All @@ -12,21 +14,21 @@ module.exports = {
'unicorn',
],
env: {
es6: true,
es2020: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:eslint-plugin/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
// TODO: consider enabling strict-type-checked
],
parserOptions: {
sourceType: 'module',
project: [
'./tsconfig.eslint.json',
'./packages/*/tsconfig.json',
'./tests/integration/tsconfig.json',
/**
* We are currently in the process of transitioning to nx's out of the box structure and
* so need to manually specify converted packages' tsconfig.build.json and tsconfig.spec.json
Expand All @@ -51,6 +53,14 @@ module.exports = {
// make sure we're not leveraging any deprecated APIs
'deprecation/deprecation': 'error',

// TODO(#7138): Investigate enabling these soon ✨
'@typescript-eslint/consistent-indexed-object-style': 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off',

// TODO(#7130): Investigate changing these in or removing these from presets
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'off',

//
// our plugin :D
//
Expand All @@ -65,25 +75,18 @@ module.exports = {
minimumDescriptionLength: 5,
},
],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', disallowTypeAnnotations: true },
],
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-function': [
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allow: ['arrowFunctions'] },
{ allowIIFEs: true },
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/restrict-template-expressions': [
'error',
{
Expand All @@ -95,7 +98,7 @@ module.exports = {
},
],
'@typescript-eslint/no-unused-vars': [
'warn',
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],

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

Expand Down Expand Up @@ -157,6 +160,7 @@ module.exports = {
'eslint-disable-line',
'eslint-disable-next-line',
'eslint-enable',
'global',
],
},
],
Expand Down Expand Up @@ -205,6 +209,18 @@ module.exports = {
'unicorn/no-typeof-undefined': 'error',
},
overrides: [
{
files: ['*.js'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: {
// turn off other type-aware rules
'deprecation/deprecation': 'off',
'@typescript-eslint/internal/no-poorly-typed-ts-props': 'off',

// turn off rules that don't apply to JS code
'@typescript-eslint/explicit-function-return-type': 'off',
},
},
// all test files
{
files: [
Expand All @@ -213,30 +229,33 @@ module.exports = {
'./packages/*/tests/**/spec.ts',
'./packages/*/tests/**/test.ts',
'./packages/parser/tests/**/*.ts',
'./tests/integration/**/*.test.ts',
'./tests/integration/integration-test-base.ts',
'./tests/integration/pack-packages.ts',
'./packages/integration-tests/tools/integration-test-base.ts',
'./packages/integration-tests/tools/pack-packages.ts',
],
env: {
'jest/globals': true,
},
rules: {
'@typescript-eslint/no-empty-function': [
'error',
{ allow: ['arrowFunctions'] },
],
'@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',
'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 @@ -315,7 +334,12 @@ module.exports = {
},
// tools and tests
{
files: ['**/tools/**/*.ts', '**/tests/**/*.ts'],
files: [
'**/tools/**/*.*t*',
'**/tests/**/*.ts',
'./packages/repo-tools/**/*.*t*',
'./packages/integration-tests/**/*.*t*',
],
rules: {
// allow console logs in tools and tests
'no-console': 'off',
Expand All @@ -342,25 +366,39 @@ module.exports = {
'@typescript-eslint/sort-type-constituents': 'error',
},
},
{
files: ['./packages/ast-spec/**/*.ts'],
rules: {
'no-restricted-imports': [
'error',
{
name: '@typescript-eslint/typescript-estree',
message:
'To prevent nx build errors, all `typescript-estree` imports should be done via `packages/ast-spec/tests/util/parsers/typescript-estree-import.ts`.',
},
],
},
},
{
files: ['rollup.config.ts'],
rules: {
'import/no-default-export': 'off',
},
},
{
files: ['./packages/website/'],
files: ['./packages/website/**/*.{ts,tsx,mts,cts,js,jsx}'],
extends: [
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['jsx-a11y', 'react', 'react-hooks'],
rules: {
'@typescript-eslint/internal/prefer-ast-types-enum': 'off',
'import/no-default-export': 'off',
'react/jsx-no-target-blank': 'off',
'react/no-unescaped-entities': 'off',
'@typescript-eslint/internal/prefer-ast-types-enum': 'off',
'react-hooks/exhaustive-deps': 'off', // TODO: enable it later
'react-hooks/exhaustive-deps': 'warn', // TODO: enable it later
},
settings: {
react: {
Expand All @@ -376,5 +414,12 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['./packages/website-eslint/src/mock/**/*.js', '*.d.ts'],
rules: {
// mocks and declaration files have to mirror their original package
'import/no-default-export': 'off',
},
},
],
};
22 changes: 18 additions & 4 deletions .github/actions/prepare-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ runs:
id: build-cache
with:
path: '**/dist/**'
key: ${{ runner.os }}-build-${{ github.ref }}
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.run_id }}
# We don't want to share builds across runs even for the same branch
# because each commit can have different build artifacts and we don't
# want to accidentally share artifacts and poison the build output
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-build-${{ github.ref }}-${{ github.run_id }}

# If the cache was hit, then we still run the types build because we generate source files
- name: Build AST Spec
if: steps['build-cache'].outputs.cache-hit == 'true'
shell: bash
run: |
npx nx run types:build
env:
SKIP_AST_SPEC_REBUILD: true

# if the cache was hit - this will run in <1s
- name: Build
if: steps['build-cache'].outputs.cache-hit != 'true'
shell: bash
# Website will be built by the Netlify GitHub App
run: |
npx nx run-many --target=build --parallel --exclude website
npx nx run-many --target=build --parallel --exclude=website --exclude=website-eslint
env:
SKIP_AST_SPEC_REBUILD: true
20 changes: 2 additions & 18 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
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 now uses package.json exports - we will be removing it next major
'eslint-scope',
// this dep is now ESM only
'execa',
// Some kind of weird caching issue:
Expand All @@ -20,17 +20,6 @@
'@nrwl/nx-cloud',
'nx-cloud',
'@nrwl/tao',
'@nx/tao',
// TODO - once we bump pass the major, we can remove these. Currently renovate is creating broken, immortal PRs
'@rollup/plugin-babel',
'@rollup/plugin-commonjs',
'@rollup/plugin-json',
'@rollup/plugin-node-resolve',
'@rollup/plugin-replace',
'@rollup/plugin-terser',
'@rollup/pluginutils',
'rollup-plugin-terser',
'rollup',
],
ignorePaths: [
// integration test package.json's should never be updated as they're purposely fixed tests
Expand Down Expand Up @@ -90,11 +79,6 @@
matchPackagePrefixes: ['@types/jest', 'jest-', '@jest/'],
groupName: 'jest',
},
{
matchPackagePrefixes: ['@rollup', 'rollup-'],
matchPackageNames: ['rollup'],
groupName: 'rollup',
},
],
postUpdateOptions: [
// run yarn dedupe to cleanup the lockfile after updates
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
merge_group:

env:
PRIMARY_NODE_VERSION: 18
PRIMARY_NODE_VERSION: 20
# Only set the read-write token if we are on the main branch
NX_CLOUD_ACCESS_TOKEN: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') && secrets.NX_CLOUD_ACCESS_TOKEN || '' }}

Expand Down Expand Up @@ -95,6 +95,21 @@ jobs:
- name: Run Check
run: yarn ${{ matrix.lint-task }}

stylelint:
name: Stylelint
needs: [install]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/prepare-install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Run stylelint check
run: yarn stylelint
working-directory: packages/website

integration_tests:
name: Run integration tests on primary Node.js version
needs: [build]
Expand All @@ -121,14 +136,16 @@ jobs:
strategy:
matrix:
# just run on the oldest and latest supported versions and assume the intermediate versions are good
node-version: [14, 18]
node-version: [16, 20]
package:
[
'ast-spec',
'eslint-plugin',
'eslint-plugin-internal',
'eslint-plugin-tslint',
'parser',
'repo-tools',
'rule-schema-to-typescript-types',
'scope-manager',
'type-utils',
'typescript-estree',
Expand Down