Migrate util, types, state, sticker-creator to ESLint
This commit is contained in:
parent
372aa44e49
commit
2ade4acd52
115 changed files with 647 additions and 448 deletions
25
.eslintrc.js
25
.eslintrc.js
|
@ -77,6 +77,8 @@ const rules = {
|
|||
|
||||
// Prefer functional components with default params
|
||||
'react/require-default-props': 'off',
|
||||
|
||||
'jsx-a11y/label-has-associated-control': ['error', { assert: 'either' }],
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
@ -94,7 +96,7 @@ module.exports = {
|
|||
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.ts', '*.tsx'],
|
||||
files: ['ts/**/*.ts', 'ts/**/*.tsx'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
|
@ -113,12 +115,31 @@ module.exports = {
|
|||
],
|
||||
rules,
|
||||
},
|
||||
{
|
||||
files: ['sticker-creator/**/*.ts', 'sticker-creator/**/*.tsx'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: './sticker-creator/tsconfig.json',
|
||||
ecmaFeatures: {
|
||||
jsx: true,
|
||||
},
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['@typescript-eslint'],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react/recommended',
|
||||
'airbnb-typescript-prettier',
|
||||
],
|
||||
rules,
|
||||
},
|
||||
{
|
||||
files: ['**/*.stories.tsx', 'ts/build/**'],
|
||||
rules: {
|
||||
...rules,
|
||||
'import/no-extraneous-dependencies': 'off',
|
||||
'react/jsx-props-no-spreading': 'off',
|
||||
'react/no-array-index-key': 'off',
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue