Skip to content

Commit

Permalink
Merge pull request #225 from oddbird/upgrade-eslint
Browse files Browse the repository at this point in the history
Upgrade eslint
  • Loading branch information
jgerigmeyer authored Oct 8, 2024
2 parents 88771bb + 77e1cf7 commit c7bb67d
Show file tree
Hide file tree
Showing 7 changed files with 426 additions and 718 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

31 changes: 0 additions & 31 deletions .eslintrc.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ updates:
- 'patch'
ignore:
- dependency-name: '@playwright/test'
- dependency-name: 'eslint'
update-types:
- 'version-update:semver-major'
62 changes: 62 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* eslint-disable import/no-named-as-default-member */

import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
{
ignores: [
'.git/*',
'.vscode/*',
'coverage/*',
'dist/*',
'node_modules/*',
'playwright-report/*',
],
},
js.configs.recommended,
...tseslint.configs.recommended,
...tseslint.configs.stylistic,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
prettier,
{
files: ['**/*.{js,mjs,cjs,ts,cts,mts}'],
languageOptions: {
globals: {
...globals.node,
...globals.es2021,
},
},
plugins: { 'simple-import-sort': simpleImportSort },
settings: {
'import/resolver': {
typescript: {
project: 'tsconfig.json',
},
},
},
rules: {
'no-warning-comments': ['warn', { terms: ['todo', 'fixme', '@@@'] }],
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',
'import/first': 'warn',
'import/newline-after-import': 'warn',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/order': 'off',
},
},
{
files: ['src/**/*.{js,mjs,cjs,ts,cts,mts}'],
languageOptions: {
globals: {
...globals.browser,
...globals.es2021,
},
},
},
];
Loading

0 comments on commit c7bb67d

Please sign in to comment.