diff --git a/README.md b/README.md index 3d6ee11..97247bd 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ If you are seeking permission to use these trademarks, then please [contact us]( [MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com) -## +## # diff --git a/package.json b/package.json index 96546e7..ce87292 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "cross-env": "^5.2.0", "eslint": "^5.6.1", "eslint-config-prettier": "^3.1.0", + "eslint-config-xo-lass": "^1.0.2", "eslint-plugin-prettier": "^2.7.0", "husky": "^1.0.1", "lint-staged": "^7.3.0", @@ -119,7 +120,6 @@ "*.js": [ "prettier --write", "xo --fix", - "npm run lint", "git add" ], "*.md": [ @@ -164,31 +164,9 @@ "xo": { "prettier": true, "space": true, - "parserOptions": { - "sourceType": "script" - }, - "rules": { - "max-len": [ - "error", - { - "code": 80, - "ignoreUrls": true - } - ], - "max-lines": [ - "error", - 2000 - ], - "unicorn/catch-error-name": [ - "error", - { - "name": "err" - } - ], - "capitalized-comments": "off", - "camelcase": "off", - "no-warning-comments": "off" - }, + "extends": [ + "xo-lass" + ], "ignores": [ "config.js" ] diff --git a/template/package b/template/package index f99d101..909cc55 100644 --- a/template/package +++ b/template/package @@ -30,6 +30,9 @@ "prettier": "latest", "remark-cli": "latest", "remark-preset-github": "latest", + <% if (eslint === 'prettier') { %> + "eslint-config-xo-lass": "latest", + <% } %> <%- eslint === 'standard' ? `"standard"`: `"xo"` %>: "latest" }, "engines": { @@ -53,7 +56,6 @@ "prettier --write", "xo --fix", <% } %> - "npm run lint", "git add" ], "*.md": ["remark . -qfo", "git add"], @@ -89,29 +91,7 @@ "xo": { "prettier": true, "space": true, - "parserOptions": { - "sourceType": "script" - }, - "rules": { - "max-len": [ - "error", - { - "code": 80, - "ignoreUrls": true - } - ], - "max-lines": [ "error", 2000 ], - "unicorn/catch-error-name": [ - "error", - { - "name": "err" - } - ], - "capitalized-comments": "off", - "camelcase": "off", - "no-warning-comments": "off", - "ava/no-todo-test": "off" - } + "extends": [ "xo-lass" ] }, <% } %> "scripts": { diff --git a/yarn.lock b/yarn.lock index a1b1d6b..df3a538 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2287,6 +2287,11 @@ eslint-config-prettier@^3.0.1, eslint-config-prettier@^3.1.0: dependencies: get-stdin "^6.0.0" +eslint-config-xo-lass@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/eslint-config-xo-lass/-/eslint-config-xo-lass-1.0.2.tgz#1307daf5eaa2687399cb8ee3df41ca466420ade0" + integrity sha512-Y5BIpHzV3U6sYDJGiX4MWxQDTL9o2DXxa/x1CMsd9n+OrkgYP+SPsrXOAolXpTSnSl+Fh5InOkjxzdsRWBZWTQ== + eslint-config-xo@^0.25.0: version "0.25.0" resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.25.0.tgz#8e8bbdee06e3d75b47aeba03fb28d4a43cc8092f" @@ -6149,7 +6154,7 @@ remark-heading-gap@^3.0.0: resolved "https://registry.yarnpkg.com/remark-heading-gap/-/remark-heading-gap-3.0.0.tgz#f52ac47a27995ef3248a59eb7544b5620b4736a6" integrity sha1-9SrEeieZXvMkilnrdUS1YgtHNqY= -"remark-license@github:niftylettuce/remark-license": +remark-license@niftylettuce/remark-license: version "4.0.1" resolved "https://codeload.github.com/niftylettuce/remark-license/tar.gz/17ecb8f64f8f6082414d14f9267a12764e6ddbfb" dependencies: