Skip to content
This repository was archived by the owner on Mar 29, 2020. It is now read-only.

Commit 6f2d63e

Browse files
committed
feat(base): add script config
1 parent dfe2864 commit 6f2d63e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

packages/eslint-config/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Available configs include:
7070
- `'@anvilabs/eslint-config/flowtype'` for [Flow](https://flowtype.org/) related rules
7171
- `'@anvilabs/eslint-config/jest'` for [Jest](https://facebook.github.io/jest/) related rules
7272
- `'@anvilabs/eslint-config/lodash'` for [Lodash](https://lodash.com/) related rules
73+
- `'@anvilabs/eslint-config/script'` for usage with config files or scripts
7374

7475
### Things to know
7576

packages/eslint-config/script.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const baseConfig = require('.');
2+
3+
// primarily used for config files in the root or in scripts
4+
module.exports = {
5+
rules: {
6+
'global-require': 'off',
7+
// https://github.com/prettier/eslint-plugin-prettier
8+
'prettier/prettier': [
9+
'error',
10+
Object.assign({}, baseConfig.rules['prettier/prettier'][1], {
11+
trailingComma: 'es5',
12+
}),
13+
],
14+
// https://github.com/benmosher/eslint-plugin-import
15+
'import/no-extraneous-dependencies': 'off',
16+
'import/no-internal-modules': 'off',
17+
},
18+
};

0 commit comments

Comments
 (0)