Skip to content

Commit

Permalink
Guide viewer eslint (#250)
Browse files Browse the repository at this point in the history
* Updated results-viewer dependencies

- Updated eslint to v9
- Renamed .eslintrc to eslint.config.mjs
- Updated lock file to latest

* Updated eslint.config to new flat config

* Fixed lint warnings
  • Loading branch information
tkmcmaster authored Aug 30, 2024
1 parent 6b784e6 commit e79fe64
Show file tree
Hide file tree
Showing 6 changed files with 976 additions and 1,249 deletions.
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

0 comments on commit e79fe64

Please sign in to comment.