Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supermind/superlint
Supermind linting standards
https://github.com/supermind/superlint
Last synced: 3 months ago
JSON representation
Supermind linting standards
- Host: GitHub
- URL: https://github.com/supermind/superlint
- Owner: supermind
- License: mit
- Created: 2017-03-16T15:58:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-21T13:21:29.000Z (over 7 years ago)
- Last Synced: 2024-07-01T11:09:05.913Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 32.2 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-eslint - Superlint - JavaScript Supermind Style. (Preconfigured Configs with ESLint Set up / Other Configs)
README
# Supermind Linting Standards
Configurable ESLint wrapper around [`eslint-config-supermind`](https://github.com/supermind/eslint-config-supermind).
Install `superlint` as a `devDependency`:
```sh
yarn add superlint --dev
```Add `superlint` to your package `scripts`:
```json
{
"scripts": {
"lint": "superlint"
}
}
```Optionally pass a glob to `superlint` to only lint those files:
```json
{
"scripts": {
"lint": "superlint source/**/*.js"
}
}
```For extra points run `superlint` before your tests:
```json
{
"scripts": {
"test": "superlint && node tests.js"
}
}
```## Configuration
Add a `superlint` field to `package.json`:
```json
{
"superlint": {
"ignore": "build",
"use": [
"flowtype",
"inferno"
],
"plugins": [
"mocha"
],
"rules": {
"semi": [ "error", "always" ]
}
}
}
```You can `ignore` files and folders using a glob or an array of globs.
To add more linting goodness for Inferno, React or Flowtype, pass an array of strings to the `use` field. Options are:
* `flowtype`
* `jsx-a11y`
* `inferno`
* `react`These options map to the rulesets from `eslint-config-supermind`.
Fields that can be set on the `superlint` object are as follows:
* `use` — Array of rulesets from `eslint-config-supermind`
* `ignore` — Glob or array of globs eg. `"build"`
* `globals` — Array of globals eg. `[ "$", "_" ]`
* `plugins` — Array of ESLint plugins eg. `[ "mocha" ]`
* `parser` — Custom parser eg. `babel-eslint`
* `rules` — Rules object eg. `{ "semi": [ "error", "always" ] }`
* `envs` — Array of environments eg. `[ "browser", "mocha" ]`
* `fix` — Boolean to automatically fix errors