mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 22:58:20 -05:00
* Enforce separate type imports * chore: enforce separate type exports * refactor: flatten sdk index exports * updates * fix improperly sorted types * fixes and prettier * prettier
54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['simple-import-sort', 'import', 'sort-exports'],
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:import/recommended',
|
|
'plugin:import/typescript',
|
|
'prettier',
|
|
],
|
|
settings: {
|
|
'import/resolver': {
|
|
typescript: {
|
|
alwaysTryTypes: true,
|
|
project: './tsconfig.json',
|
|
},
|
|
},
|
|
},
|
|
rules: {
|
|
'simple-import-sort/imports': 'error',
|
|
'sort-exports/sort-exports': [
|
|
'error',
|
|
{ sortDir: 'asc', ignoreCase: false, sortExportKindFirst: 'type' },
|
|
],
|
|
|
|
'import/first': 'error',
|
|
'import/no-duplicates': 'error',
|
|
'import/newline-after-import': 'error',
|
|
},
|
|
ignorePatterns: ['dist/', 'node_modules/'],
|
|
overrides: [
|
|
{
|
|
files: ['*.cjs'],
|
|
env: {
|
|
node: true,
|
|
commonjs: true,
|
|
es6: true,
|
|
},
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: 'script',
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-var-requires': 'off',
|
|
},
|
|
},
|
|
],
|
|
};
|