Skip to content

Commit

Permalink
chore: update eslint overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Sep 13, 2021
1 parent be8c23a commit a8ddcca
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 39 deletions.
31 changes: 13 additions & 18 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ const OFF = 0
const ERROR = 2

module.exports = {
// parse proposal features like class fileds
parser: '@typescript-eslint/parser',

// https://eslint.org/docs/user-guide/configuring#specifying-parser-options
parserOptions: {
ecmaVersion: 2019,
Expand All @@ -13,11 +10,6 @@ module.exports = {
// Supports JSX syntax (not the same as supporting React).
jsx: true,
},
project: [
'./tsconfig.eslint.json',
'./example/tsconfig.json',
'./packages/*/tsconfig.json',
],
},

// commonly used envs
Expand All @@ -30,9 +22,20 @@ module.exports = {

overrides: [
{
files: ['**/*.js'],
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./example/tsconfig.json', './packages/*/tsconfig.json'],
},
extends: [
// https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-extra-semi': 'off',
},
},
],
Expand All @@ -51,9 +54,6 @@ module.exports = {
'plugin:prettier/recommended',
// https://github.com/prettier/eslint-config-prettier
'prettier',
// https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],

plugins: ['react-hooks', '@typescript-eslint'],
Expand All @@ -73,11 +73,6 @@ module.exports = {
// hooks
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',

// TS
'@typescript-eslint/no-unsafe-assignment': 'warn',
'@typescript-eslint/no-unsafe-member-access': 'warn',
'@typescript-eslint/no-extra-semi': 'off',
},

settings: {
Expand Down
6 changes: 0 additions & 6 deletions packages/griffith-mp4/.eslintrc.js

This file was deleted.

11 changes: 11 additions & 0 deletions packages/griffith-mp4/src/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: [require.resolve('../../../.eslintrc.js')],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@typescript-eslint/no-unsafe-call': 'warn',
},
},
],
}
15 changes: 0 additions & 15 deletions tsconfig.eslint.json

This file was deleted.

0 comments on commit a8ddcca

Please sign in to comment.