Skip to content

Commit

Permalink
chore(website): fix playground (#5575)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Aug 31, 2022
1 parent 27b24e3 commit f7c5deb
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/website-eslint/rollup.config.js
Expand Up @@ -36,6 +36,10 @@ module.exports = {
/utils\/dist\/ts-eslint\/ESLint\.js/,
// 'eslint/lib/shared/ajv.js',
// 'eslint/lib/shared/runtime-info.js',
/ajv\/lib\/definition_schema\.js/,
/stream/,
/os/,
/fs/,
],
target: './src/mock/empty.js',
},
Expand Down Expand Up @@ -64,6 +68,14 @@ module.exports = {
match: /semver$/u,
target: './src/mock/semver.js',
},
{
match: /^globby$/u,
target: './src/mock/globby.js',
},
{
match: /^is-glob$/u,
target: './src/mock/is-glob.js',
},
],
replace: [
{
Expand Down
4 changes: 4 additions & 0 deletions packages/website-eslint/src/mock/globby.js
@@ -0,0 +1,4 @@
export function sync() {
// the website config is static and doesn't use glob config
return [];
}
4 changes: 4 additions & 0 deletions packages/website-eslint/src/mock/is-glob.js
@@ -0,0 +1,4 @@
export default function isGlob() {
// the website config is static and doesn't use glob config
return false;
}
3 changes: 3 additions & 0 deletions packages/website-eslint/src/mock/semver.js
@@ -1,4 +1,7 @@
import satisfies from 'semver/functions/satisfies';
import major from 'semver/functions/major';

// just in case someone adds a import * as semver usage
export { satisfies, major };

export default { satisfies, major };

0 comments on commit f7c5deb

Please sign in to comment.