Skip to content

Commit

Permalink
chore: switch to eslint + upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffijoe committed Dec 27, 2023
1 parent 5aca079 commit 54872a7
Show file tree
Hide file tree
Showing 16 changed files with 1,858 additions and 933 deletions.
39 changes: 39 additions & 0 deletions .eslintrc.cjs
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',
},
},
],
}
Loading

0 comments on commit 54872a7

Please sign in to comment.