Skip to content

Commit

Permalink
update styleling to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightjack committed May 15, 2024
1 parent 7050b2a commit 00954b6
Show file tree
Hide file tree
Showing 7 changed files with 173 additions and 254 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

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

/** @type {import("eslint").Linter.FlatConfig[]} */
export default [
eslint.configs.recommended,
prettier,
{
files: ['src/**/*.js'],
languageOptions: {
globals: {
YUI: true,
...globals.browser,
},
},
},
{
files: ['tests/**/*.js'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ['netlify_functions/**/*.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['**/*.mjs'],
languageOptions: {
parserOptions: {
sourceType: 'module',
ecmaVersion: 'latest',
},
globals: {
...globals.node,
},
},
},
{ ignores: ['dist/', 'tmp/', '.netlify'] },
];
7 changes: 7 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"module": "ESNext",
"target": "ESNext"
},
"exclude": ["node_modules"]
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
"test": "playwright test"
},
"devDependencies": {
"@eslint/js": "9.2.0",
"@playwright/test": "^1.36.2",
"@types/eslint": "^8.56.10",
"@types/node": "^20.0.0",
"eslint": "8.57.0",
"eslint": "9.2.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.1.3",
"globals": "^15.2.0",
"lefthook": "^1.6.8",
"mockdate": "^3.0.5",
"netlify-cli": "17.23.5",
Expand Down
Loading

0 comments on commit 00954b6

Please sign in to comment.