This package provides AngelList's .eslintrc.js
as an extensible shared config.
Our default export contains all of our ESLint rules, including ECMAScript 6+, React, presets inherited, etc. Thus, there are a ton of peer dependencies to satisfy.
yarn add --dev 'git+https://github.com/venturehacks/eslint-config-angellist#1.1.2'
If this were a public repository on the npm registry, we could abstract peer dependency installation to one command. Unfortunately, it's private. The dependency list is crudely maintained in this README:
yarn add --dev \
'@typescript-eslint/[email protected]' \
'@typescript-eslint/[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]' \
'[email protected]'
Add "extends": "angellist"
to your .eslintrc.js
module.exports = {
extends: ['angellist'],
// TypeScript: you must specify where your tsconfig(s) are located
parserOptions: {
project: ['./tsconfig.json', './tsconfig.server.json'],
},
// rule overrides
rules: {
// warning: has dangerous autofix;
// ok to set to 'warn' w/o husky autofix hook
'react-hooks/exhaustive-deps': 'off',
},
// declare which API's are polyfilled (and thus ignored)
settings: {
polyfills: [
'Promise',
'Object.values',
'window.scrollTo',
'window.scrollY',
'URLSearchParams',
],
},
};
Place these in package.json
{
"scripts": {
"eslint": "eslint '**/*.ts*'",
"eslint:fix": "eslint '**/*.ts*' --fix",
}
}