Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add eslint-plugin-eslint-comments plugin #117

Merged
merged 1 commit into from Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -46,6 +46,7 @@ yarn add \
eslint babel-eslint prettier \
eslint-config-algolia eslint-config-prettier \
eslint-plugin-import eslint-plugin-prettier \
eslint-plugin-eslint-comments \
--dev
```

Expand Down
2 changes: 1 addition & 1 deletion base.js
Expand Up @@ -20,7 +20,7 @@ module.exports = {
'./rules/base.js',
'prettier',
],
plugins: ['import', 'prettier'],
plugins: ['eslint-comments', 'import', 'prettier'],
settings: {
'import/extensions': ['.js'],
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -40,6 +40,7 @@
"eslint": "5.16.0",
"eslint-config-algolia": "10.1.0",
"eslint-config-prettier": "6.4.0",
"eslint-plugin-eslint-comments": "3.1.2",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "21.27.2",
"eslint-plugin-prettier": "2.7.0",
Expand Down
9 changes: 9 additions & 0 deletions rules/base.js
Expand Up @@ -257,6 +257,15 @@ module.exports = {
'template-curly-spacing': ['error'],
'yield-star-spacing': ['error'],

// Comments
// https://mysticatea.github.io/eslint-plugin-eslint-comments
'eslint-comments/disable-enable-pair': ['error'],
'eslint-comments/no-aggregating-enable': ['error'],
'eslint-comments/no-duplicate-disable': ['error'],
'eslint-comments/no-unlimited-disable': ['error'],
'eslint-comments/no-unused-disable': ['error'],
'eslint-comments/no-unused-enable': ['error'],

// Import
// https://github.com/benmosher/eslint-plugin-import
'import/no-amd': ['error'],
Expand Down
1 change: 1 addition & 0 deletions sample-project/package.json
Expand Up @@ -21,6 +21,7 @@
"eslint": "5.16.0",
"eslint-config-algolia": "file:../",
"eslint-config-prettier": "6.4.0",
"eslint-plugin-eslint-comments": "3.1.2",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "21.27.2",
"eslint-plugin-prettier": "2.7.0",
Expand Down
13 changes: 13 additions & 0 deletions sample-project/yarn.lock
Expand Up @@ -433,6 +433,14 @@ eslint-module-utils@^2.4.0:
debug "^2.6.8"
pkg-dir "^2.0.0"

eslint-plugin-eslint-comments@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.2.tgz#4ef6c488dbe06aa1627fea107b3e5d059fc8a395"
integrity sha512-QexaqrNeteFfRTad96W+Vi4Zj1KFbkHHNMMaHZEYcovKav6gdomyGzaxSDSL3GoIyUOo078wRAdYlu1caiauIQ==
dependencies:
escape-string-regexp "^1.0.5"
ignore "^5.0.5"

eslint-plugin-import@2.18.2:
version "2.18.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6"
Expand Down Expand Up @@ -787,6 +795,11 @@ ignore@^4.0.6:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==

ignore@^5.0.5:
version "5.1.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf"
integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==

import-fresh@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390"
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Expand Up @@ -907,6 +907,14 @@ eslint-module-utils@^2.4.0:
debug "^2.6.8"
pkg-dir "^2.0.0"

eslint-plugin-eslint-comments@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.1.2.tgz#4ef6c488dbe06aa1627fea107b3e5d059fc8a395"
integrity sha512-QexaqrNeteFfRTad96W+Vi4Zj1KFbkHHNMMaHZEYcovKav6gdomyGzaxSDSL3GoIyUOo078wRAdYlu1caiauIQ==
dependencies:
escape-string-regexp "^1.0.5"
ignore "^5.0.5"

eslint-plugin-import@2.18.2:
version "2.18.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6"
Expand Down Expand Up @@ -1490,6 +1498,11 @@ ignore@^4.0.6:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==

ignore@^5.0.5:
version "5.1.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf"
integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==

import-fresh@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390"
Expand Down