Skip to content

Commit

Permalink
#1726: improve linting for .mcdev-validations.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JoernBerkefeld committed Sep 19, 2024
1 parent 01965ee commit af6b8cd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boilerplate/files/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
"functionCase": "upper",
"keywordCase": "upper"
}
},
{
"files": ".mcdev-validations.js",
"options": {
"trailingComma": "es5"
}
}
]
}
18 changes: 18 additions & 0 deletions boilerplate/files/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ export default [
'prettier/prettier': 'warn'
}
},
{
files: ['.mcdev-validations.js'],

languageOptions: {
globals: {
...globals.nodeBuiltin
},

ecmaVersion: 2022,
sourceType: 'module'
},

rules: {
'no-var': 'error',
'prefer-const': 'error',
'prettier/prettier': 'warn'
}
},
{
files: ['eslint.config.js'],

Expand Down
4 changes: 4 additions & 0 deletions boilerplate/forcedUpdates.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[
{
"version": "7.4.3",
"files": ["eslint.config.js", ".prettierrc"]
},
{
"version": "7.4.2",
"files": [".vscode/settings.json"]
Expand Down

0 comments on commit af6b8cd

Please sign in to comment.