-
Notifications
You must be signed in to change notification settings - Fork 29
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
Custom eslint rules #35
base: master
Are you sure you want to change the base?
Conversation
@@ -104,7 +104,7 @@ function generateServiceWorker() { | |||
* | |||
*/ | |||
|
|||
const tasks = { | |||
let tasks = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably don't need to change this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right 👍
Thanks for the PR. The general approach is good. If CWD/.eslintrc and CWD/test/.eslintrc exist, then use those instead of the ones in the archetype. Eventually these are all the eslint check scripts One of the things I was considering is to allow apps to override archetype config. https://github.com/electrode-io/electrode-archetype-react-app/blob/master/config/archetype.js |
In most cases, people are using only one linter config file (I think). But sure, if you want I could check for |
@@ -242,6 +242,18 @@ const tasks = { | |||
"test-server-dev": () => shell.test("-d", "test/server") && exec(`mocha -c --opts ${config.mocha}/mocha.opts test/server`) | |||
}; | |||
|
|||
// Check if any .eslintrc file exists on the | |||
// project root path. | |||
const customLinterPath = Path.join(process.cwd(), ".eslintrc"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since eslint --init
can generate files like .eslintrc.json
, can this accept:
- no extension
.js
.json
?
@kooparse +1 on separate configuration files, esp. since the archetype has the separation anyway. However, ESLint doesn't support globbing/custom directories for
I've tested such placement (one |
It is perhaps preferable to wait the plugin model (#30).