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

Try to fix ESLint ConfigErrors #1766

Merged
merged 5 commits into from
Jan 15, 2025
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
7 changes: 7 additions & 0 deletions .changeset/fifty-nails-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'eslint-config-skuba': patch
---

Remove duplicate `@typescript-eslint` definitions

These configs already defined in `eslint-config-seek/base` 14.
7 changes: 7 additions & 0 deletions .changeset/three-rings-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'eslint-config-skuba': minor
---

Remove `eslint-plugin-tsdoc`

This plugin is [currently incompatible](https://github.com/microsoft/tsdoc/issues/374) with our config.
20 changes: 0 additions & 20 deletions packages/eslint-config-skuba/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
const base = require('eslint-config-seek/base');
const extensions = require('eslint-config-seek/extensions');
const tsdoc = require('eslint-plugin-tsdoc');
const eslintPluginYml = require('eslint-plugin-yml');
const tseslint = require('typescript-eslint');

const { js: jsExtensions, ts: tsExtensions } = extensions;

Expand Down Expand Up @@ -88,13 +86,6 @@ module.exports = [
],
},
},
...[
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
].map((config) => ({
...config,
files: [`**/*.{${tsExtensions}}`],
})),
{
files: [`**/*.{${tsExtensions}}`],

Expand Down Expand Up @@ -136,17 +127,6 @@ module.exports = [
'@typescript-eslint/no-unsafe-member-access': 'off',
},
},
{
files: [`**/*.{${tsExtensions}}`],

plugins: {
tsdoc,
},

rules: {
'tsdoc/syntax': 'error',
},
},
{
files: [`**/*.test.{${tsExtensions}}`, `**/testing/**/*.{${tsExtensions}}`],

Expand Down
1 change: 0 additions & 1 deletion packages/eslint-config-skuba/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
},
"dependencies": {
"eslint-config-seek": "^14.0.1",
"eslint-plugin-tsdoc": "^0.4.0",
"eslint-plugin-yml": "^1.14.0",
"typescript-eslint": "^8.16.0"
},
Expand Down
38 changes: 6 additions & 32 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions src/cli/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ describe('TypeScript', () => {
test('Stricter Checks For The in Operator', () => {
const flag = true;

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
expect(flag ? true : 'foo' in 42).toBeDefined();
});
Expand Down Expand Up @@ -135,16 +134,14 @@ describe('TypeScript', () => {

test('override and the --noImplicitOverride flag', () => {
class SomeComponent {
// eslint-disable-next-line @typescript-eslint/no-empty-function
show() {}
// eslint-disable-next-line @typescript-eslint/no-empty-function

hide() {}
}

class SpecializedComponent extends SomeComponent {
// eslint-disable-next-line @typescript-eslint/no-empty-function
override show() {}
// eslint-disable-next-line @typescript-eslint/no-empty-function

override hide() {}
}

Expand All @@ -168,7 +165,6 @@ describe('TypeScript', () => {
return null;
}

// eslint-disable-next-line @typescript-eslint/no-empty-function
static #someStaticMethod() {}

somePublicMethod() {
Expand Down
1 change: 0 additions & 1 deletion src/cli/lint/internalLints/upgrade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const fileExtensions = ['js', 'ts'];
const resolvePatches = async (version: string): Promise<Patches> => {
for (const extension of fileExtensions) {
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These autofixes make me think that the @typescript-eslint rules are not applying correctly now 😞. Probably needs a deeper think.

return (await import(`./patches/${version}/index.${extension}`)).patches;
} catch {
// Ignore
Expand Down
Loading