From 9fad242382cbd730e17fa64323900721f656d416 Mon Sep 17 00:00:00 2001 From: zacanger Date: Fri, 18 Oct 2019 15:56:32 -0600 Subject: chore: switch from tslint to eslint --- ui/.eslintrc.json | 57 ++ ui/package.json | 6 +- ui/src/components/symbols.tsx | 2 +- ui/tslint.json | 28 - ui/yarn.lock | 1296 ++++++++++++++++++++++++++++++++++++++++- 5 files changed, 1342 insertions(+), 47 deletions(-) create mode 100644 ui/.eslintrc.json delete mode 100644 ui/tslint.json diff --git a/ui/.eslintrc.json b/ui/.eslintrc.json new file mode 100644 index 00000000..bee9e538 --- /dev/null +++ b/ui/.eslintrc.json @@ -0,0 +1,57 @@ +{ + "root": true, + "env": { + "browser": true + }, + "plugins": [ + "jane", + "inferno" + ], + "extends": [ + "plugin:jane/recommended", + "plugin:jane/typescript", + "plugin:inferno/recommended" + ], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "project": "./tsconfig.json", + "warnOnUnsupportedTypeScriptVersion": false + }, + "rules": { + "@typescript-eslint/camelcase": 0, + "@typescript-eslint/member-delimiter-style": 0, + "@typescript-eslint/no-empty-interface": 0, + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-this-alias": 0, + "@typescript-eslint/no-unused-vars": 0, + "@typescript-eslint/no-use-before-define": 0, + "@typescript-eslint/no-useless-constructor": 0, + "arrow-body-style": 0, + "curly": 0, + "eol-last": 0, + "eqeqeq": 0, + "func-style": 0, + "import/no-duplicates": 0, + "inferno/jsx-key": 0, + "inferno/jsx-no-target-blank": 0, + "inferno/jsx-props-class-name": 0, + "inferno/no-direct-mutation-state": 0, + "inferno/no-unknown-property": 0, + "max-statements": 0, + "new-cap": 0, + "no-console": 0, + "no-duplicate-imports": 0, + "no-extra-parens": 0, + "no-return-assign": 0, + "no-throw-literal": 0, + "no-trailing-spaces": 0, + "no-unused-expressions": 0, + "no-useless-constructor": 0, + "no-useless-escape": 0, + "no-var": 0, + "prefer-const": 0, + "prefer-rest-params": 0, + "quote-props": 0, + "unicorn/filename-case": 0 + } +} diff --git a/ui/package.json b/ui/package.json index 3537a2ac..603faf0b 100644 --- a/ui/package.json +++ b/ui/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "start": "node fuse dev", - "build": "node fuse prod" + "build": "node fuse prod", + "lint": "eslint --report-unused-disable-directives --ext .js,.ts,.tsx src" }, "keywords": [], "author": "Dessalines", @@ -43,6 +44,9 @@ }, "devDependencies": { "@types/i18next": "^12.1.0", + "eslint": "^6.5.1", + "eslint-plugin-inferno": "^7.14.3", + "eslint-plugin-jane": "^7.0.0", "fuse-box": "^3.1.3", "ts-transform-classcat": "^0.0.2", "ts-transform-inferno": "^4.0.2", diff --git a/ui/src/components/symbols.tsx b/ui/src/components/symbols.tsx index e2803fb7..a299ff25 100644 --- a/ui/src/components/symbols.tsx +++ b/ui/src/components/symbols.tsx @@ -8,7 +8,7 @@ export class Symbols extends Component { render() { return ( -