Skip to content

Commit

Permalink
eslint 9
Browse files Browse the repository at this point in the history
  • Loading branch information
egoroof committed Apr 6, 2024
1 parent 19adcf1 commit b42f2f5
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 268 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

22 changes: 22 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import js from '@eslint/js';

export default [
js.configs.recommended,
{
languageOptions: {
globals: {
TextEncoder: 'readonly',
TextDecoder: 'readonly',
console: 'readonly',
},
},
rules: {
'no-var': 2, // require let or const instead of var
'prefer-arrow-callback': 2, // suggest using arrow functions as callbacks
'prefer-const': 2, // suggest using const declaration for variables that are never modified after declared
'prefer-rest-params': 2, // suggest using the rest parameters instead of arguments
'prefer-spread': 2, // suggest using the spread operator instead of .apply().
'prefer-template': 2, // suggest using template literals instead of strings concatenation
},
},
];
Loading

0 comments on commit b42f2f5

Please sign in to comment.