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

Add JS and SCSS lint #758

Merged
merged 5 commits into from
May 14, 2019
Merged

Add JS and SCSS lint #758

merged 5 commits into from
May 14, 2019

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Feb 19, 2019

Changes

  • set up npm-based linting using standardjs and sass-lint conform reflecting the component conventions
  • update JavaScript files to conform with standardjs linting rules
  • update SCSS files to conform with sass-lint linting rules
  • update Jenkins tasks to run linting

This will align linting tools with the govuk-frontend repo.

Note
scss- rules are still preserved until govuk-lint is retired otherwise CI will fail

IDE Integration

For standardjs there is a list on the project's website: https://standardjs.com/#are-there-text-editor-plugins

For sass-lint there are a couple of extensions, I'll list a couple below:

Related

#124

@benthorner benthorner temporarily deployed to govuk-publishing-compon-pr-758 February 19, 2019 17:33 Inactive
@alex-ju alex-ju changed the title [WIP] Add JS and SCSS lint Add JS and SCSS lint Feb 19, 2019
@andysellick
Copy link
Contributor

Any chance you can provide some details of how to set this up locally? My editor currently has different linting rules, obviously would be good to align.

@alex-ju
Copy link
Contributor Author

alex-ju commented Feb 20, 2019

@andysellick:
Standardjs: https://standardjs.com/#are-there-text-editor-plugins

Sass-lint: there are a couple of extensions, I'll list a few below:

@tijmenb
Copy link
Contributor

tijmenb commented Feb 20, 2019

This is awesome. I've raised alphagov/govuk-rfcs#100 to talk about the entire linting system.

Jenkinsfile Show resolved Hide resolved
@alex-ju alex-ju force-pushed the add-js-and-scss-lint branch 3 times, most recently from a47913f to 83e270c Compare May 14, 2019 09:01
@alex-ju alex-ju force-pushed the add-js-and-scss-lint branch from 83e270c to 5624055 Compare May 14, 2019 10:29
@alex-ju alex-ju merged commit 9531ad8 into master May 14, 2019
@alex-ju alex-ju deleted the add-js-and-scss-lint branch May 14, 2019 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants