Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
switch to .eslintrc.js format
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neculau (anu) committed Jul 31, 2017
1 parent 455ac67 commit b09aaf7
Show file tree
Hide file tree
Showing 27 changed files with 535 additions and 503 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# eslint-config-firecloud

In your project's `.eslintrc.yaml`

```yaml
extends:
- firecloud/node.yaml
rules:
- override-some-rule: error
In your project's `.eslintrc.js`

```js
module.exports = {
extends: [
'firecloud/node.js'
],
rules: {
'override-some-rule': error
}
}
```

In order to install the required peer dependencies,
Expand All @@ -17,9 +21,9 @@ you can run `node_modules/eslint-config-firecloud/npm-install-peer-dependencies`

Common bundles are provided as following:

- Node.js: `firecloud/node.yaml`
- Browser: `firecloud/browser.yaml`
- no IDE: `firecloud/no-ide.yaml`
- Node.js: `firecloud/node.js`
- Browser: `firecloud/browser.js`
- no IDE: `firecloud/no-ide.js`


## No IDE checks
Expand All @@ -28,7 +32,9 @@ Some rules are stricter and on `warn` level, targeting IDEs.

When running `eslint` from the CLI/CI, you can turn these off,
to lower the noise level, via
`eslint -c node_modules/eslint-config-firecloud/no-idea.yaml`.
`eslint -c node_modules/eslint-config-firecloud/no-ide.js`.

**NOTE 2017-07-31** this is active by default, until https://github.com/eslint/eslint/issues/7549 is fixed. When it is fixed, remove this note and remove no-ide extension from `browser.js` and `node.js`


## License
Expand Down
13 changes: 13 additions & 0 deletions browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: [
'./configs/basic.js',
'./configs/babel.js',
'./configs/async-await.js',
'./configs/dependencies.js',
'./configs/import.js',
'./configs/no-null.js',
'./configs/max-len-2.js',
'./configs/browser.js',
'./no-ide.js' // REMOVE after https://github.com/eslint/eslint/issues/7549
]
};
11 changes: 0 additions & 11 deletions browser.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions configs/async-await.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
plugins: [
'async-await'
],

rules: {
'async-await/space-after-await': 'error',
'async-await/space-after-async': 'error'
}
};
6 changes: 0 additions & 6 deletions configs/async-await.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions configs/babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
plugins: [
'babel'
],

parser: 'babel-eslint',

parserOptions: {
sourceType: 'module'
},

rules: {
'babel/new-cap': 'error',
'babel/object-curly-spacing': 'error',
'babel/semi': 'error',
'new-cap': 'off',
'object-curly-spacing': 'off',
semi: 'error' // why not off?
}
};
13 changes: 0 additions & 13 deletions configs/babel.yaml

This file was deleted.

Loading

0 comments on commit b09aaf7

Please sign in to comment.