Skip to content

Commit

Permalink
chore(public-docsite-setup): migrate to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
mainframev committed Dec 31, 2024
1 parent 852d675 commit a8bd13f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
19 changes: 0 additions & 19 deletions packages/public-docsite-setup/.eslintrc.json

This file was deleted.

34 changes: 34 additions & 0 deletions packages/public-docsite-setup/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const es = require('eslint-plugin-es');
const js = require('@eslint/js');

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/react--legacy'),
{
files: ['bin/*.js', 'src/loadSite.ts'],

rules: {
'no-console': 'off',
'no-restricted-globals': 'off',
},
},
...compat.extends('plugin:es/restrict-to-es2017').map(config => ({
...config,
files: ['bin/*.js', 'scripts/*.js'],
})),
{
files: ['bin/*.js', 'scripts/*.js'],

plugins: {
es,
},
},
];

2 changes: 1 addition & 1 deletion packages/public-docsite-setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"clean": "just-scripts clean",
"code-style": "just-scripts code-style",
"just": "just-scripts",
"lint": "ESLINT_USE_FLAT_CONFIG=false just-scripts lint && eslint ./bin/*.js ./scripts/*.js"
"lint": "just-scripts lint"
},
"license": "MIT",
"devDependencies": {
Expand Down

0 comments on commit a8bd13f

Please sign in to comment.