-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for ESLint Flat Config (#15)
* - Support for ESLint Flat Config * Change files * - Updating just-scripts version * - Converting to Flat Config * Change files * Change files * - Fixing legacy file name
- Loading branch information
Showing
15 changed files
with
151 additions
and
65 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@minecraft-core-build-tasks-da7d6e11-184c-4135-b8bc-a3626a674a63.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Support for ESLint Flat Config", | ||
"packageName": "@minecraft/core-build-tasks", | ||
"email": "frgarc@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@minecraft-math-53db88ef-0630-4f25-900a-cab0514b466e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Using flat config", | ||
"packageName": "@minecraft/math", | ||
"email": "frgarc@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/eslint-plugin-minecraft-linting-7b130e35-6c54-4c46-bf1e-4398f642ef8a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Support for ESLint Flat Config", | ||
"packageName": "eslint-plugin-minecraft-linting", | ||
"email": "frgarc@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import configMinecraftScripting from 'eslint-config-minecraft-scripting'; | ||
|
||
export default [...configMinecraftScripting]; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
import eslintPluginUnicorn from 'eslint-plugin-unicorn'; | ||
import eslint from '@eslint/js'; | ||
import globals from 'globals'; | ||
import header from 'eslint-plugin-header'; | ||
import minecraftLinting from 'eslint-plugin-minecraft-linting'; | ||
import tsEslint from '@typescript-eslint/eslint-plugin'; | ||
import tsParser from '@typescript-eslint/parser'; | ||
|
||
export default [ | ||
eslintConfigPrettier, | ||
eslint.configs.recommended, | ||
{ | ||
files: ['**/*.{ts,tsx,js,jsx}', '*.ts'], | ||
languageOptions: { | ||
parser: tsParser, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
project: './tsconfig.json', | ||
}, | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
plugins: { | ||
header, | ||
tsEslint, | ||
'@typescript-eslint': tsEslint, | ||
unicorn: eslintPluginUnicorn, | ||
'minecraft-linting': minecraftLinting, | ||
}, | ||
rules: { | ||
...tsEslint.configs['eslint-recommended'].rules, | ||
...tsEslint.configs['recommended'].rules, | ||
'unicorn/no-abusive-eslint-disable': 'error', | ||
'unicorn/no-null': ['error', { checkStrictEquality: true }], | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
}, | ||
], | ||
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true, allowBoolean: true }], | ||
eqeqeq: ['error', 'always'], | ||
'@typescript-eslint/no-unsafe-assignment': 'error', | ||
'@typescript-eslint/no-unsafe-member-access': 'error', | ||
'@typescript-eslint/no-unsafe-call': 'error', | ||
'header/header': [ | ||
2, | ||
'line', | ||
[' Copyright (c) Microsoft Corporation.', ` Licensed under the MIT License.`], | ||
1, | ||
], | ||
'minecraft-linting/avoid-unnecessary-command': 'error', | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import configMinecraftScripting from 'eslint-config-minecraft-scripting'; | ||
|
||
export default [...configMinecraftScripting]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters