Skip to content

Commit

Permalink
Merge branch 'main' of github.com:abrahamguo/typescript-eslint into n…
Browse files Browse the repository at this point in the history
…o-unnecessary-type-assertion
  • Loading branch information
abrahamguo committed Mar 8, 2024
2 parents fadd011 + 01cbca5 commit 5e04444
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 81 deletions.
36 changes: 20 additions & 16 deletions docs/getting-started/typed-linting/Monorepos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,16 @@ For each file being linted, the first matching project path will be used as its
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
languageOptions: {
parserOptions: {
// Remove this line
project: true,
// Add this line
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
}
{
languageOptions: {
parserOptions: {
// Remove this line
project: true,
// Add this line
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
},
},
},
);
```
Expand Down Expand Up @@ -103,14 +105,16 @@ Instead of globs that use `**` to recursively check all folders, prefer paths th
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
languageOptions: {
parserOptions: {
// Remove this line
project: ['./tsconfig.eslint.json', './**/tsconfig.json'],
// Add this line
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
tsconfigRootDir: import.meta.dirname
}
{
languageOptions: {
parserOptions: {
// Remove this line
project: ['./tsconfig.eslint.json', './**/tsconfig.json'],
// Add this line
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
},
},
},
);
```
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export default tseslint.config(
// in the rare case that we do - just need to manually restart their IDE.
glob: 'Infinity',
},
sourceType: 'module',
project: [
'tsconfig.json',
'packages/*/tsconfig.json',
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-eslint/src/config-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ TODO - convert this to /utils/ts-eslint
*/
import type { TSESLint } from '@typescript-eslint/utils';

interface ConfigWithExtends extends TSESLint.FlatConfig.Config {
export interface ConfigWithExtends extends TSESLint.FlatConfig.Config {
/**
* Allows you to "extend" a set of configs similar to `extends` from the
* classic configs.
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-eslint/src/configs/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default (
): FlatConfig.Config => ({
languageOptions: {
parser,
parserOptions: { sourceType: 'module' },
sourceType: 'module',
},
plugins: {
'@typescript-eslint': plugin,
Expand Down
2 changes: 2 additions & 0 deletions packages/typescript-eslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as parserBase from '@typescript-eslint/parser';
// see the comment in config-helper.ts for why this doesn't use /ts-eslint
import type { TSESLint } from '@typescript-eslint/utils';

import type { ConfigWithExtends } from './config-helper';
import { config } from './config-helper';
import allConfig from './configs/all';
import baseConfig from './configs/base';
Expand Down Expand Up @@ -45,6 +46,7 @@ const configs = {
};

export type Config = TSESLint.FlatConfig.ConfigFile;
export type { ConfigWithExtends };
/*
eslint-disable-next-line import/no-default-export --
we do both a default and named exports to allow people to use this package from
Expand Down
124 changes: 62 additions & 62 deletions packages/website/data/sponsors.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "ESLint",
"image": "https://images.opencollective.com/eslint/48a2e5d/logo.png",
"name": "ESLint",
"totalDonations": 2880000,
"totalDonations": 2910000,
"website": "https://eslint.org/"
},
{
Expand All @@ -17,42 +17,42 @@
"id": "Nx (by Nrwl)",
"image": "https://images.opencollective.com/nx/0efbe42/logo.png",
"name": "Nx (by Nrwl)",
"totalDonations": 875000,
"totalDonations": 900000,
"website": "https://nx.dev"
},
{
"id": "Hugging Face",
"image": "https://images.opencollective.com/huggingface/5c934ee/logo.png",
"name": "Hugging Face",
"totalDonations": 440000,
"totalDonations": 460000,
"website": "https://huggingface.co"
},
{
"id": "Codecademy",
"image": "https://images.opencollective.com/codecademy/d56a48d/logo.png",
"name": "Codecademy",
"totalDonations": 250000,
"totalDonations": 260000,
"website": "https://codecademy.com"
},
{
"id": "Airbnb",
"image": "https://images.opencollective.com/airbnb/d327d66/logo.png",
"name": "Airbnb",
"totalDonations": 215800,
"website": "https://www.airbnb.com/"
},
{
"id": "Cybozu",
"image": "https://images.opencollective.com/cybozu/933e46d/logo.png",
"name": "Cybozu",
"totalDonations": 210000,
"totalDonations": 245000,
"website": "https://cybozu.co.jp/"
},
{
"id": "Airbnb",
"image": "https://images.opencollective.com/airbnb/d327d66/logo.png",
"name": "Airbnb",
"totalDonations": 220800,
"website": "https://www.airbnb.com/"
},
{
"id": "Sourcegraph",
"image": "https://images.opencollective.com/sourcegraph/67e40ff/logo.png",
"name": "Sourcegraph",
"totalDonations": 200000,
"totalDonations": 210000,
"website": "https://about.sourcegraph.com"
},
{
Expand All @@ -62,6 +62,13 @@
"totalDonations": 150000,
"website": "https://www.gitbook.com"
},
{
"id": "JetBrains",
"image": "https://images.opencollective.com/jetbrains/eb04ddc/logo.png",
"name": "JetBrains",
"totalDonations": 150000,
"website": "https://www.jetbrains.com/"
},
{
"id": "n8n.io - n8n GmbH",
"image": "https://images.opencollective.com/n8n/dca2f0c/logo.png",
Expand Down Expand Up @@ -90,13 +97,6 @@
"totalDonations": 111111,
"website": "https://bitwarden.com/"
},
{
"id": "JetBrains",
"image": "https://images.opencollective.com/jetbrains/eb04ddc/logo.png",
"name": "JetBrains",
"totalDonations": 100000,
"website": "https://www.jetbrains.com/"
},
{
"id": "THANKS.DEV",
"image": "https://images.opencollective.com/thanks-dev/ed78b39/logo.png",
Expand All @@ -118,20 +118,20 @@
"totalDonations": 70000,
"website": "https://www.codiga.io"
},
{
"id": "STORIS",
"image": "https://images.opencollective.com/storis/dfb0e13/logo.png",
"name": "STORIS",
"totalDonations": 61000,
"website": "https://www.storis.com/"
},
{
"id": "DeepSource",
"image": "https://images.opencollective.com/deepsource/0f18cea/logo.png",
"name": "DeepSource",
"totalDonations": 60000,
"website": "https://deepsource.io/"
},
{
"id": "STORIS",
"image": "https://images.opencollective.com/storis/dfb0e13/logo.png",
"name": "STORIS",
"totalDonations": 58500,
"website": "https://www.storis.com/"
},
{
"id": "Future Processing",
"image": "https://images.opencollective.com/future-processing/1410d26/logo.png",
Expand Down Expand Up @@ -188,6 +188,13 @@
"totalDonations": 23000,
"website": "https://revojs.ro"
},
{
"id": "CryptoNewsZ",
"image": "https://images.opencollective.com/cryptonewsz/f50c823/logo.png",
"name": "CryptoNewsZ",
"totalDonations": 22500,
"website": "https://www.cryptonewsz.com/"
},
{
"id": "Ian MacLeod",
"image": "https://images.opencollective.com/nevir/35c52ef/avatar.png",
Expand All @@ -203,11 +210,18 @@
"website": "https://blacksheepcode.com"
},
{
"id": "CryptoNewsZ",
"image": "https://images.opencollective.com/cryptonewsz/f50c823/logo.png",
"name": "CryptoNewsZ",
"totalDonations": 20000,
"website": "https://www.cryptonewsz.com/"
"id": "Evil Martians",
"image": "https://images.opencollective.com/evilmartians/707ab4d/logo.png",
"name": "Evil Martians",
"totalDonations": 18000,
"website": "https://evilmartians.com/"
},
{
"id": "Quicko",
"image": "https://images.opencollective.com/quicko/7bd1dc9/logo.png",
"name": "Quicko",
"totalDonations": 18000,
"website": "https://quicko.com"
},
{
"id": "kartenmacherei",
Expand All @@ -216,13 +230,6 @@
"totalDonations": 18000,
"website": "https://celebrate.company"
},
{
"id": "Evil Martians",
"image": "https://images.opencollective.com/evilmartians/707ab4d/logo.png",
"name": "Evil Martians",
"totalDonations": 17500,
"website": "https://evilmartians.com/"
},
{
"id": "Balsa",
"image": "https://images.opencollective.com/balsa/77de498/logo.png",
Expand All @@ -234,44 +241,44 @@
"id": "Corellium",
"image": "https://images.opencollective.com/corellium/aa8c228/logo.png",
"name": "Corellium",
"totalDonations": 16200,
"totalDonations": 16800,
"website": "https://www.corellium.com"
},
{
"id": "Quicko",
"image": "https://images.opencollective.com/quicko/7bd1dc9/logo.png",
"name": "Quicko",
"totalDonations": 16000,
"website": "https://quicko.com"
},
{
"id": "THE PADDING",
"image": "https://images.opencollective.com/thepadding/55e79ad/logo.png",
"name": "THE PADDING",
"totalDonations": 15000,
"website": "https://paddn.com/"
},
{
"id": "0+X",
"image": "https://images.opencollective.com/0-x/7239aff/logo.png",
"name": "0+X",
"totalDonations": 15000,
"website": "https://www.0x.se"
},
{
"id": "Now4real",
"image": "https://images.opencollective.com/now4real/54ca7d9/logo.png",
"name": "Now4real",
"totalDonations": 14500,
"website": "https://now4real.com/"
},
{
"id": "0+X",
"image": "https://images.opencollective.com/0-x/7239aff/logo.png",
"name": "0+X",
"totalDonations": 14000,
"website": "https://www.0x.se"
},
{
"id": "Trevor Burnham",
"image": "https://images.opencollective.com/trevorburnham/016f6da/avatar.png",
"name": "Trevor Burnham",
"totalDonations": 13000,
"totalDonations": 14000,
"website": "https://trevorburnham.com"
},
{
"id": "Defined Networking",
"image": "https://images.opencollective.com/defined-networking/072920e/logo.png",
"name": "Defined Networking",
"totalDonations": 12500,
"website": "https://www.defined.net"
},
{
"id": "Knowledge Work",
"image": "https://images.opencollective.com/knowledge-work/f91b72d/logo.png",
Expand Down Expand Up @@ -299,12 +306,5 @@
"name": "Laserhub",
"totalDonations": 10000,
"website": "https://laserhub.com/"
},
{
"id": "Defined Networking",
"image": "https://images.opencollective.com/defined-networking/072920e/logo.png",
"name": "Defined Networking",
"totalDonations": 10000,
"website": "https://www.defined.net"
}
]

0 comments on commit 5e04444

Please sign in to comment.