chore(lint): update ESlint config to run prettier

This commit is contained in:
Jeroen de Bruijn committed 2020-03-23 14:07:09 +01:00
1 parent 2bf775c20e
commit 5196b054ea
3 files changed
+10 -13

No files matched your search

+7 -9
View File
@@ -1,24 +1,22 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'json'],
plugins: ['@typescript-eslint', 'prettier', 'json'],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
env: {
es6: true,
es2020: true,
node: true,
},
rules: {
'no-fallthrough': 'error',
'sort-imports': 'warn',
'prettier/prettier': 'error',
'sort-imports': 'error',
},
};
+1 -4
View File
@@ -1,8 +1,5 @@
module.exports = {
'*.{ts,tsx,js,jsx,json}': [
'npm run lint-file',
'npm run format-file:default',
],
'*.{ts,tsx,js,jsx,json}': ['npm run lint-file:fix'],
'*.{vue,ts,css,less,scss,html,htm,md,markdown,yml,yaml}': [
'npm run format-file:default',
],
+2
View File
@@ -4,7 +4,9 @@
"description": "GitHub Action to run Renovate self-hosted.",
"scripts": {
"lint": "eslint --ignore-path .prettierignore --ext .ts,.tsx,.js,.jsx,.json .",
"lint:fix": "eslint --ignore-path .prettierignore --ext .ts,.tsx,.js,.jsx,.json --fix .",
"lint-file": "eslint --ignore-path .prettierignore",
"lint-file:fix": "eslint --ignore-path .prettierignore --fix",
"format": "concurrently \"npm:format:default\"",
"format:default": "prettier --write \"**/*.{js,jsx,vue,ts,css,less,scss,html,htm,json,md,markdown,yml,yaml}\"",
"format-file:default": "prettier --write",