Skip to content

Commit

Permalink
eslint: Remove incorrectly duplicated configuration for help-beta.
Browse files Browse the repository at this point in the history
`help-beta/**.ts` does not work in ESLint, and the duplication is
unnecessary.

Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Nov 27, 2024
1 parent 111afd3 commit aa0dd44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 56 deletions.
58 changes: 2 additions & 56 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -160,68 +160,14 @@ module.exports = {
},
{
files: ["**/*.cts", "**/*.mts", "**/*.ts"],
excludedFiles: "help-beta/**",
extends: [
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/typescript",
],
parserOptions: {
project: "tsconfig.json",
},
settings: {
"import/resolver": {
node: {
extensions: [".ts", ".d.ts", ".js"], // https://github.com/import-js/eslint-plugin-import/issues/2267
},
},
},
globals: {
JQuery: false,
},
rules: {
// Disable base rule to avoid conflict
"no-use-before-define": "off",

"@typescript-eslint/consistent-type-assertions": [
"error",
{assertionStyle: "never"},
],
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{allowExpressions: true},
],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{args: "all", argsIgnorePattern: "^_", ignoreRestSiblings: true},
],
"@typescript-eslint/no-use-before-define": [
"error",
{functions: false, variables: false},
],
"@typescript-eslint/parameter-properties": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/restrict-plus-operands": ["error", {}],
"@typescript-eslint/restrict-template-expressions": ["error", {}],
"no-undef": "error",
},
},
{
files: ["help-beta/**.ts"],
extends: [
"plugin:@typescript-eslint/strict-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:import/typescript",
],
parserOptions: {
project: "help-beta/tsconfig.json",
project: true,
tsconfigRootDir: __dirname,
},
settings: {
"import/resolver": {
Expand Down
2 changes: 2 additions & 0 deletions help-beta/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/* eslint-disable @typescript-eslint/triple-slash-reference */

/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

0 comments on commit aa0dd44

Please sign in to comment.