Skip to content

Commit

Permalink
Update to ESLint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
pfumagalli committed Jun 21, 2024
1 parent 0293b42 commit ce43fdb
Show file tree
Hide file tree
Showing 5 changed files with 910 additions and 1,770 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

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

This file was deleted.

52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import configurations from '@plugjs/eslint-plugin'

export default [
...configurations,

// ===== DEFINE THE LOCATION OF OUR TSCONFIG.JSON FILES ======================
{
languageOptions: {
parserOptions: {
createDefaultProgram: false,
project: [
'./tsconfig.json',
'./test/tsconfig.json',
],
},
},
},

// ===== ENSURE THAT OUR MAIN FILES DEPEND ONLY ON PROPER DEPENDENCIES =======
{
files: [ 'src/**' ],
rules: {
// Turn _ON_ dependencies checks only for sources
'import-x/no-extraneous-dependencies': [ 'error', {
'devDependencies': true,
'peerDependencies': true,
'optionalDependencies': true,
'bundledDependencies': false,
} ],
},
},

// ===== PROJECT LOCAL RULES =================================================
// Add any extra rule not tied to a specific "files" pattern here, e.g.:
// {
// rules: {
// 'camelcase': 'off',
// },
// },

// ===== IGNORED FILES =======================================================
// REMEMBER! Ignores *must* be in its own configuration, they can not coexist
// with "rules", "languageOptions", "files", ... or anything else, otherwise
// ESLint will blaantly ignore the ignore files!
{
ignores: [
'coverage/',
'dist/',
'node_modules/',
],
},
]
Loading

0 comments on commit ce43fdb

Please sign in to comment.