-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: switch to eslint + upgrade packages
- Loading branch information
Showing
16 changed files
with
1,858 additions
and
933 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
], | ||
overrides: [ | ||
// TypeScript | ||
{ | ||
files: ['**/*.ts'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: __dirname, | ||
}, | ||
rules: { | ||
// Only disabling this because this code is very old but also battle-tested, | ||
// and coming up with clever typings may break for consumers. | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// We use `require` for loading the `package.json` file. | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
// Tests | ||
{ | ||
files: ['**/__tests__/*.test.ts'], | ||
rules: { | ||
// Unused vars are used for dependency resolution. | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
|
||
// Some types are useful for testing. | ||
'@typescript-eslint/ban-types': 'off', | ||
}, | ||
}, | ||
], | ||
} |
Oops, something went wrong.