-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.prepublish.js
More file actions
32 lines (23 loc) · 883 Bytes
/
Copy path.eslintrc.prepublish.js
File metadata and controls
32 lines (23 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module.exports = {
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
extraFileExtensions: ['.json'],
},
plugins: ['@typescript-eslint'],
ignorePatterns: ['dist/**', 'node_modules/**', '*.js', '**/*.test.ts', 'package.json'],
rules: {
// Allow unused variables that start with underscore
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
// Allow any type in some cases
'@typescript-eslint/no-explicit-any': 'warn',
// Allow non-null assertion
'@typescript-eslint/no-non-null-assertion': 'warn',
// Allow empty interfaces for extensibility
'@typescript-eslint/no-empty-interface': 'warn',
// Disable some rules for publishing
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/prefer-as-const': 'warn',
},
};