From f31048aae11ad5aee6dd2d95445a401145ed5c3f Mon Sep 17 00:00:00 2001 From: Ragnar Rebase Date: Fri, 24 Jan 2020 21:19:51 +0200 Subject: [PATCH] fix: move eslint conf out of template.json --- template.json | 22 ---------------------- template/.eslintrc | 18 ++++++++++++++++++ template/src/index.tsx | 1 + template/src/serviceWorker.ts | 1 + 4 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 template/.eslintrc diff --git a/template.json b/template.json index a1811e4..330a708 100644 --- a/template.json +++ b/template.json @@ -32,28 +32,6 @@ "lint": "tsc --noEmit && eslint '*/**/*.{ts,tsx}'", "lint:fix": "yarn lint --quiet --fix" }, - "eslintConfig": { - "parser": "@typescript-eslint/parser", - "extends": [ - "plugin:react/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - "prettier/@typescript-eslint" - ], - "rules": { - "@typescript-eslint/explicit-function-return-type": "off" - }, - "settings": { - "react": { - "version": "detect" - } - }, - "ignorePatterns": [ - "coverage/", - "node_modules/", - "src/serviceWorker.ts" - ] - }, "jest": { "coveragePathIgnorePatterns": [ "./src/index.tsx", diff --git a/template/.eslintrc b/template/.eslintrc new file mode 100644 index 0000000..b4abc59 --- /dev/null +++ b/template/.eslintrc @@ -0,0 +1,18 @@ +{ + "parser": "@typescript-eslint/parser", + "extends": [ + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", + "prettier/@typescript-eslint" + ], + "rules": { + "@typescript-eslint/explicit-function-return-type": "off" + }, + "settings": { + "react": { + "version": "detect" + } + }, + "ignorePatterns": ["coverage/", "node_modules/", "src/serviceWorker.ts"] +} diff --git a/template/src/index.tsx b/template/src/index.tsx index fe9f400..ec4e45c 100644 --- a/template/src/index.tsx +++ b/template/src/index.tsx @@ -1,3 +1,4 @@ +/* istanbul ignore file */ import React from "react"; import ReactDOM from "react-dom"; import "./index.scss"; diff --git a/template/src/serviceWorker.ts b/template/src/serviceWorker.ts index 5895b6f..1c8c81c 100644 --- a/template/src/serviceWorker.ts +++ b/template/src/serviceWorker.ts @@ -1,3 +1,4 @@ +/* istanbul ignore file */ // This optional code is used to register a service worker. // register() is not called by default.