minotor
Version:
A lightweight client-side transit routing library.
53 lines (51 loc) • 1.4 kB
JavaScript
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettierConfig from 'eslint-config-prettier';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.strictTypeChecked,
prettierConfig,
{
ignores: ['scripts/*', 'rollup.config.js'],
},
{
files: ['**/*.ts'],
languageOptions: {
ecmaVersion: 2019,
sourceType: 'module',
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
'simple-import-sort': simpleImportSort,
},
rules: {
'@typescript-eslint/no-unused-expressions': 'off', // Breaks the linting
'@typescript-eslint/restrict-template-expressions': [
'error',
{ allowNumber: true },
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
files: ['src/**/*.test.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 'off',
},
},
{
files: ['src/stops/proto/*.ts', 'src/timetable/proto/*.ts'],
rules: {
'eslint-comments/no-unlimited-disable': 'off',
'eslint-comments/disable-enable-pair': 'off',
},
},
);