Skip to content

Commit

Permalink
eslint flat config migration
Browse files Browse the repository at this point in the history
  • Loading branch information
EmranMR committed Sep 2, 2024
1 parent dead019 commit 5eae5e1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 24 deletions.
52 changes: 28 additions & 24 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
module.exports = {
env: {
commonjs: true,
es2021: true,
},
extends: 'google',
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'max-len': [
'error',
{
code: 120,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
},
],
},
};
import globals from "globals"
import google from "eslint-config-google"

export default [
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.commonjs,
...globals.es2021,
}
},
...google,
rules: {
indent: ['error', 2, { SwitchCase: 1 }],
'max-len': [
'error',
{
code: 120,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
},
],
},
}
]
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "tree-sitter-blade",
"version": "0.10.1",
"description": "tree-sitter-blade grammar for Laravel Blade files",
"type": "module",
"main": "bindings/node",
"keywords": [
"tree-sitter-blade",
Expand Down Expand Up @@ -30,6 +31,7 @@
"devDependencies": {
"eslint": ">=8.54.0",
"eslint-config-google": "^0.14.0",
"globals": "^15.9.0",
"tree-sitter-cli": "^0.20.8"
},
"tree-sitter": [
Expand Down

0 comments on commit 5eae5e1

Please sign in to comment.