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

Improve .eslintrc #6

Open
arithmetric opened this issue Jun 4, 2015 · 1 comment
Open

Improve .eslintrc #6

arithmetric opened this issue Jun 4, 2015 · 1 comment
Labels

Comments

@arithmetric
Copy link
Collaborator

Following from discussion in phase2/grunt-drupal-tasks#160 Gadget should provide a Drupal 8 version of the eslintrc, and Gadget can provide improvements of the Drupal 7 version.

cc @mdeltito @grayside

@grayside
Copy link
Contributor

In Drupal 8, the drupal-scaffold script is pulling down Drupal's top-level .eslintrc file, which consists of

{
  "extends": "./core/.eslintrc"
}

Presumably, we could have gadget extend from that one and simply lean on core. Unfortunately, that would introduce a dependency from grunt validate to Drupal docroot, something we don't have yet. The move to composer to build the Drupal docroot has significantly mitigated this as a concern, but it could still lead to problems in edge cases.

Another approach would be to remove .eslintrc from gadget, and instead have composer copy Drupal core's .eslint to the project root. This tries for the best of both worlds: no strong dependency on the docroot, and the build process will update "source" configuration as needed. This is a bit of a side-effect abuse, as normally we avoid changing files that are committed when we run the build process.

Marking this as a question as this needs further discussion to select a course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants