From 831481f1c8245ba01f57cdcbb86fb240cda94847 Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Fri, 15 May 2020 01:18:35 -0300 Subject: [PATCH] Redefine system of the code linter --- .editorconfig | 8 -------- .eslintrc | 3 --- .prettierignore | 2 ++ bower.json | 4 ++-- composer.json | 4 ++-- package.json | 27 ++++++++++++++++++--------- 6 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .eslintrc create mode 100644 .prettierignore diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index d389cd8..0000000 --- a/.editorconfig +++ /dev/null @@ -1,8 +0,0 @@ -charset = utf-8 -end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true -max_line_length = null -root = true -trim_trailing_whitespace = true diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 2742b60..0000000 --- a/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "styled" -} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5a6afbc --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +dist +.nyc_output diff --git a/bower.json b/bower.json index 1cc8d20..6e2f748 100644 --- a/bower.json +++ b/bower.json @@ -29,10 +29,10 @@ ], "ignore": [ ".appveyor.yml", - ".editorconfig", - ".eslintrc", ".github", ".gitignore", + ".gitpod.yml", + ".prettierignore", ".sasslintrc", ".travis.yml", "backstop.config.js", diff --git a/composer.json b/composer.json index 6fd7353..9129411 100644 --- a/composer.json +++ b/composer.json @@ -29,10 +29,10 @@ ], "ignore": [ ".appveyor.yml", - ".editorconfig", - ".eslintrc", ".github", ".gitignore", + ".gitpod.yml", + ".prettierignore", ".sasslintrc", ".travis.yml", "backstop.config.js", diff --git a/package.json b/package.json index d6b66e8..3900c1e 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ ], "ignore": [ ".appveyor.yml", - ".editorconfig", - ".eslintrc", ".github", ".gitignore", + ".gitpod.yml", + ".prettierignore", ".sasslintrc", ".travis.yml", "backstop.config.js", @@ -53,14 +53,14 @@ "backstopjs": "^3.8.9", "banner-cli": "^0.14.0", "browser-sync": "^2.18.5", - "eslint": "^6.0.1", - "eslint-config-styled": "0.0.2", - "husky": "^3.0.0", + "husky": "^4.2.5", + "lint-staged": "^10.2.2", "node-sass": "^4.12.0", "npm-run-all": "^4.1.5", "nyc": "^14.1.1", "onchange": "^6.0.0", "postcss-cli": "^6.1.3", + "prettier-standard": "^16.3.0", "rimraf": "^2.5.4", "sass-lint": "^1.12.1" }, @@ -80,12 +80,21 @@ "backstop": "run-s build && run-s serve compare", "reference": "backstop reference --config backstop.config.js", "compare": "backstop test --config backstop.config.js", - "lint": "sass-lint -c .sasslintrc src --verbose --no-exit && eslint . --ignore-path .gitignore package.js", - "ava": "nyc ava", - "precommit": "run-p test", + "lint": "prettier-standard --check && sass-lint -c .sasslintrc src --verbose --no-exit", "prepublish": "run-s build", "postpublish": "run-s clean", - "test": "run-s build lint ava" + "test": "npm run build && nyc ava" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "**/*": [ + "prettier-standard --format", + "git add" + ] }, "resolutions": { "natives": "1.1.3"