2022-12-21 02:08:20 +03:00
|
|
|
/* eslint-env node */
|
|
|
|
|
|
|
|
require('@uniswap/eslint-config/load')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
extends: '@uniswap/eslint-config/react',
|
2023-03-29 23:25:30 +03:00
|
|
|
overrides: [
|
2023-04-13 22:43:47 +03:00
|
|
|
{
|
|
|
|
// Configuration/typings typically export objects/definitions that are used outside of the transpiled package
|
|
|
|
// (eg not captured by the tsconfig). Because it's typical and not exceptional, this is turned off entirely.
|
|
|
|
files: ['**/*.config.*', '**/*.d.ts'],
|
|
|
|
rules: {
|
|
|
|
'import/no-unused-modules': 'off',
|
|
|
|
},
|
|
|
|
},
|
2023-03-29 23:25:30 +03:00
|
|
|
{
|
|
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
|
|
rules: {
|
2023-04-20 23:43:31 +03:00
|
|
|
'import/no-restricted-paths': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
zones: [
|
|
|
|
{
|
|
|
|
target: ['src/**/*[!.test].ts', 'src/**/*[!.test].tsx'],
|
|
|
|
from: 'src/test-utils',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2023-03-29 23:25:30 +03:00
|
|
|
'no-restricted-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
paths: [
|
|
|
|
{
|
|
|
|
name: 'zustand',
|
|
|
|
importNames: ['default'],
|
|
|
|
message: 'Default import from zustand is deprecated. Import `{ create }` instead.',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2022-12-21 02:08:20 +03:00
|
|
|
}
|