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

Guide viewer eslint #250

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,25 +1,54 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ["lib/", "webpack.config.js", "eslint.config.mjs", ".storybook/"],
}, ...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/stylistic",
"plugin:@typescript-eslint/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslint,
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/stylistic",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": ["lib/", "webpack.config.js"],
"rules": {

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: ["./tsconfig.json"],
},
},

rules: {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/ban-types": 1,
"@typescript-eslint/no-empty-object-type": 1,
"@typescript-eslint/no-unsafe-function-type": 1,
"@typescript-eslint/no-wrapper-object-types": 1,
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/no-unused-vars": [1, { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-unused-vars": [1, {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
}],
"@typescript-eslint/await-thenable": 1,
"@typescript-eslint/no-shadow": "warn",
"no-shadow": "off",
"no-prototype-builtins": 1,
"require-await": 1,
"class-name": 0,
Expand Down Expand Up @@ -48,20 +77,17 @@
"sort-imports": 1,
"space-before-function-paren": 1,
"spaced-comment": ["error", "always", { "block": { "balanced": true } }],
"space-infix-ops":"warn",
"space-infix-ops": "warn",
"space-before-blocks": "warn",
"keyword-spacing": "warn",
"key-spacing": 1,
"strict": 1,
"strict": 0,
"comma-dangle": 1,
"triple-equals": 0,
"unified-signatures": 0,
"camelcase": 1,
"no-irregular-whitespace": 1,
"object-shorthand": 1,
"no-shadow": "off",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/await-thenable": 1,
"quotes": ["warn", "double"]
}
}
"quotes": ["warn", "double"],
},
}];
Loading