Skip to content

Commit

Permalink
fix: Migrate .eslintrc.js to flat format eslint.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Nov 29, 2024
1 parent 80b6aa0 commit 555bece
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { FlatCompat } from '@eslint/eslintrc'
const compat = new FlatCompat()

import eslintPluginLocal from './eslint-plugin-local/index.mjs'

export default [
// standard,
...compat.extends('eslint-config-standard'),
{
files: ['**/**.js', '**/**.mjs'],
languageOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
plugins: { 'local': eslintPluginLocal },
rules: {
/*
This is inserted to make this compatible with prettier.
Once https://github.com/prettier/prettier/issues/3845 and https://github.com/prettier/prettier/issues/3847 are solved this might be not needed any more.
*/
'space-before-function-paren': 0,
curly: [2, 'all'],
'local/no-big-int': 'error',
},
},
]

0 comments on commit 555bece

Please sign in to comment.