Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adi518/linter-cheatsheet
https://github.com/adi518/linter-cheatsheet
beautify jshint jslint linter scss-lint
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/adi518/linter-cheatsheet
- Owner: adi518
- Created: 2017-02-24T00:57:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-19T22:43:00.000Z (over 7 years ago)
- Last Synced: 2024-10-28T09:21:48.190Z (about 2 months ago)
- Topics: beautify, jshint, jslint, linter, scss-lint
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linter Cheatsheet
It happens to be a major PITA to find these little snippets, so I gather all useful findings here. As a rule of thumb, you should use these as last resort to solve a linting issue.
_* Some `JSlint` suppressors work with `JSHint`, YMMV. For `JShint/JSLint` compatibility, `space` after a comment token (`/_`) must be omitted.
## ESLint
- Suppress all
```
/* eslint-disable */
```- Suppress all for a single line
```
// eslint-disable-line
```- Suppress a rule for a single line
```
// eslint-disable-line
```- Suppress a rule for all
```
/* eslint-disable */ E.g.: /* eslint-disable space-before-function-paren */
```## JShint
- Suppress environment warnings
```
// jslint browser: true
// jslint jquery: true
// jshint esversion: 6
```- Suppress undefined global variables. **
```
/*global , , ... */
```- Suppress exported/unused global variables. **
```
/*exported , , ... */
```- Suppress a single warning. E.g.: `// jshint -W001`
```
// jshint -<*>
// jshint +<*>
```- Suppress all warnings
```
// jshint ignore:start
// jshint ignore:end
```- Suppress all warnings for a single line
```
// jshint ignore:line
```## HTML-Lint
[Rules](https://github.com/yaniswang/HTMLHint/wiki/Rules)
```
```
## SCSS-Lint
- Suppress a single warning. Example: `// scss-lint:enable Compass::PropertyWithMixin`
```
// scss-lint:enable <*>
// scss-lint:disable <*>
```## Pug-lint (was Jade)
## Beautify
- Suppress through a section (must be a block-comment)
```
/* beautify ignore:start */
/* beautify ignore:end */
```