diff --git a/apps/pr-deploy-site/.eslintrc.json b/apps/pr-deploy-site/.eslintrc.json deleted file mode 100644 index 75b0d9e79f26dc..00000000000000 --- a/apps/pr-deploy-site/.eslintrc.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true, - "overrides": [ - { - // pr-deploy-site.js is run without transpiling in all browsers, which means it must use - // IE 11-compatible syntax as long as we still support IE 11. - "files": ["pr-deploy-site.js"], - "plugins": ["es"], - "extends": ["plugin:es/restrict-to-es2015", "plugin:@microsoft/eslint-plugin-sdl/required"], - "rules": { - // turn off conflicting or unwanted rules from normal set - "curly": "off", - "no-var": "off", - "vars-on-top": "off", - "prefer-arrow-callback": "off", - "no-restricted-globals": "off" - } - } - ] -} diff --git a/apps/pr-deploy-site/eslint.config.js b/apps/pr-deploy-site/eslint.config.js new file mode 100644 index 00000000000000..b5f3fe55818431 --- /dev/null +++ b/apps/pr-deploy-site/eslint.config.js @@ -0,0 +1,29 @@ +const js = require('@eslint/js'); +const sdl = require('@microsoft/eslint-plugin-sdl'); +const es = require('eslint-plugin-es'); +const { FlatCompat } = require('@eslint/eslintrc'); + +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}); + +module.exports = [ + ...compat.extends('plugin:@fluentui/eslint-plugin/node'), + ...sdl.configs.recommended, + { + files: ['**/pr-deploy-site.js'], + plugins: { + es, + }, + + rules: { + curly: 'off', + 'no-var': 'off', + 'vars-on-top': 'off', + 'prefer-arrow-callback': 'off', + 'no-restricted-globals': 'off', + }, + }, +]; diff --git a/apps/pr-deploy-site/package.json b/apps/pr-deploy-site/package.json index 6535c274c036aa..d694f119735d55 100644 --- a/apps/pr-deploy-site/package.json +++ b/apps/pr-deploy-site/package.json @@ -7,7 +7,7 @@ "scripts": { "clean": "just-scripts clean", "generate:site": "just-scripts generate:site", - "lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.ts --cache .", + "lint": "eslint --cache .", "type-check": "tsc -p . --noEmit" }, "license": "MIT",