uniswap-interface-uncensored/.eslintrc.js

46 lines
1.2 KiB
JavaScript
Raw Normal View History

/* eslint-env node */
require('@uniswap/eslint-config/load')
module.exports = {
extends: '@uniswap/eslint-config/react',
overrides: [
{
// 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',
},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'import/no-restricted-paths': [
'error',
{
zones: [
{
target: ['src/**/*[!.test].ts', 'src/**/*[!.test].tsx'],
from: 'src/test-utils',
},
],
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'zustand',
importNames: ['default'],
message: 'Default import from zustand is deprecated. Import `{ create }` instead.',
},
],
},
],
},
},
],
}