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

Remove sass lint #1902

Merged
merged 6 commits into from
Sep 14, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
514 changes: 0 additions & 514 deletions config/.sass-lint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/contributing/application-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

- `config/`

Configuration files for the preview app, [sass-lint](https://github.com/sasstools/sass-lint) and [Jest](https://github.com/facebook/jest).
Configuration files for the preview app and [Jest](https://github.com/facebook/jest).


- `dist/` **contains auto-generated files**
Expand Down Expand Up @@ -59,7 +59,7 @@
Application modules and helpers. See [tasks](tasks.md) for more information about the tasks.


### Auto-generated directories
### Auto-generated directories

- `public/`

Expand Down
16 changes: 5 additions & 11 deletions docs/contributing/coding-standards/css.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,13 @@ This makes it easier to keep track of different contexts.
# Linting

To ensure code quality and consistency in our Sass files we check that certain
style rules are followed using a project [YAML file](../../../config/.sass-lint.yml)

As we're using node-sass parser to parse our scss files, the package of choice
is [sass-lint](https://github.com/sasstools/sass-lint).
style rules are followed. These rules are based on [stylelint-config-gds](https://github.com/alphagov/stylelint-config-gds/blob/main/scss.js), but we also add our own custom rules with a project [YAML file](../../../.stylelintrc.yml).

See [testing and linting](/docs/releasing/testing-and-linting.md) for more information.

## Running the lint task

You can run the linter in [gulp](https://www.npmjs.com/package/gulp-sass-lint)
or check linting directly in [Sublime Text](https://github.com/skovhus/SublimeLinter-contrib-sass-lint),
[Atom](https://atom.io/packages/linter-sass-lint)
or other [IDE's](https://github.com/sasstools/sass-lint#ide-integration)
You can run the linter in gulp by running `gulp scss:lint`, or use linting in [Sublime Text](https://github.com/SublimeLinter/SublimeLinter-stylelint), [Atom](https://atom.io/packages/linter-stylelint) or [other editors that support stylelint](https://stylelint.io/user-guide/integrations/editor).

See also [testing and linting](/docs/releasing/testing-and-linting.md).

Expand Down Expand Up @@ -441,7 +435,7 @@ Good:
$my-example-var: value;
```

### Don't write trailing zeros for numeric values with a decimal point
### Don't write trailing zeroes for numeric values with a decimal point

Bad:
```
Expand All @@ -453,13 +447,13 @@ Bad:
Good:
```
.selector {
font-size: 0.5em;
font-size: .5em;
}
```

### Remove trailing whitespace

More write up on [supported rules](https://github.com/sasstools/sass-lint/tree/master/docs/rules).
More write up on [supported rules](https://stylelint.io/user-guide/rules/list).

## SassDoC
We document SCSS using [SassDoc](http://sassdoc.com/file-level-annotations/). This includes most of the settings, helpers and tools layers, with variables, functions and mixins being marked as private or public.
Expand Down
7 changes: 1 addition & 6 deletions docs/contributing/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This task will:
**`gulp styles`**

This task will:
- run sass lint task (`gulp scss:lint`)
- run scss lint task (`gulp scss:lint`)
- sass compilation (`gulp scss:compile`) to a destination folder that can be specified via a --destination flag

**`gulp scripts`**
Expand All @@ -77,11 +77,6 @@ This task will:
This task will:
- compile all `src/govuk/components/componentName/componentName.njk` files to HTML files

**`gulp lint`**

Is an umbrella task that will run:
- `gulp scss:lint`

## Express app only

To simply run the Express app without gulp tasks being triggered, simply run `node app/start.js`.
2 changes: 1 addition & 1 deletion docs/releasing/testing-and-linting.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To check the whole codebase, run:
npm test
```

This will trigger [standard](https://github.com/standard/standard) and [sass-lint](https://github.com/sasstools/sass-lint) for linting, and [Jest](https://github.com/facebook/jest) for unit and functional tests.
This will trigger [standard](https://github.com/standard/standard) and [stylelint](https://github.com/stylelint/stylelint) for linting, and [Jest](https://github.com/facebook/jest) for unit and functional tests.

See [Tasks](tasks.md) for details of what `npm test` does.

Expand Down
5 changes: 1 addition & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const taskArguments = require('./tasks/gulp/task-arguments')

// Gulp sub-tasks
require('./tasks/gulp/clean.js')
require('./tasks/gulp/lint.js')
require('./tasks/gulp/compile-assets.js')
require('./tasks/gulp/nodemon.js')
require('./tasks/gulp/watch.js')
Expand All @@ -25,11 +24,10 @@ gulp.task('scripts', gulp.series(
))

// Umbrella styles tasks for preview ----
// Runs js lint and compilation
// Runs scss lint and compilation
// --------------------------------------
gulp.task('styles', gulp.series(
'scss:lint',
'scss:stylelint',
'scss:compile'
))

Expand All @@ -46,7 +44,6 @@ gulp.task('copy:assets', () => {
// --------------------------------------
gulp.task('test', gulp.series(
'scss:lint',
'scss:stylelint',
'scss:compile'
))

Expand Down
Loading