Problem/Motivation
The process for applying our ESLint rules is a manual process. Without a test command in a package.json file this process is often overlooked during development.
Proposed resolution
Adding a script to package.json will allow other developers to apply the eslint standards more easily. After the patch and once the dependencies are installed (using npm install) the code can be checked with npm run lint.
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | interdiff.patch | 415 bytes | droplet |
| #19 | core-es6-eslint-2809343-19.patch | 5.01 KB | droplet |
| #17 | core-es6-eslint-2809343-17.patch | 9.71 KB | nod_ |
| #16 | interdiff.txt | 535 bytes | GrandmaGlassesRopeMan |
| #16 | 2809343-16.patch | 746 bytes | GrandmaGlassesRopeMan |
Comments
Comment #2
dawehner<3
Comment #3
GrandmaGlassesRopeManComment #4
droplet commentedthis will finish without error message from npm.
Comment #5
nod_Comment #6
manuel garcia commented+1
Gave it a go just now working as expected...
Comment #7
GrandmaGlassesRopeMan@droplet
Could you possibly paste the error you were getting? I didn't see anything. What node version are you running on. We should probably specify a engine version.
Comment #8
dawehnerSo I'm wondering whether the file should be maybe in
core/package.jsonkind of similar to have the maincomposer.jsonin core as well.Comment #9
nod_Unlike composer.json files, there is no merge or extend functionality built in package.json file.
@matt: introduce a syntax violation in some code, we need the exit 0 otherwise it's ugly.
Comment #10
dawehnerWell, I'm asking that because in a world of drupal-project/drupal-scaffold just the core folder is actually shipped, so it might be useful to still have the package.json shipped then.
Comment #11
droplet commented@drpal,
edit a file in CORE dir and make it fail.
more background info: https://github.com/eslint/eslint/issues/2409
Comment #12
nod_Comment #13
GrandmaGlassesRopeManwrong patch here.Comment #14
GrandmaGlassesRopeManSorry, this is the correct patch. Rerolled due to #2809477: Add ES6 to ES5 build process being merged.
Comment #15
nod_Folder looks wrong already in core folder.
Comment #16
GrandmaGlassesRopeManThis feels slightly wrong, since it doesn't appear you can 'extend' the
eslintignore rules. I tried to get--ignore-pathto work, but encountered some strange file system bugs.Comment #17
nod_code changes in the babel script are to follow airbnb coding standards.
Comment #18
GrandmaGlassesRopeManShould we keep these at specific versions like the rest of our dependencies.
Comment #19
droplet commented@see interdiff
Comment #20
alexpottCommitted 193aae3 and pushed to 8.3.x. Thanks!
Comment #22
tstoecklerI think the change to active-link.js that was committed was unintentional ?!
Comment #23
alexpott@tstoeckler++ thank you.
I reverted the change to this single file. @tstoeckler is correct - nothing to do with this change. I should have spotted that.
Comment #25
droplet commentedOuch. I made a big mistake. Sorry! I will investigate why I included it. I staged them before interdiff & patch..
and this is my concern in Point 3 of :
https://www.drupal.org/node/2809477#comment-11680919
and comment 8
https://www.drupal.org/node/2809477#comment-11681103