Skip to content

Commit

Permalink
Use new shared configs
Browse files Browse the repository at this point in the history
  • Loading branch information
GZolla committed Nov 27, 2024
1 parent 710af05 commit 3442cc0
Show file tree
Hide file tree
Showing 5 changed files with 659 additions and 621 deletions.
1 change: 0 additions & 1 deletion cli/empty-state-illustration-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ function createSvgs(svgs) {
const destPath = path.join(outputPath, `${name}.js`);

const data = readFileSync(sourcePath);
/* eslint-disable-next-line prefer-template */
const output = '// auto-generated\n' + 'export const val = `' + data + '`;\n';

writeFileSync(destPath, output);
Expand Down
2 changes: 0 additions & 2 deletions cli/icon-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ function createSvg(category, name) {
}

const data = readFileSync(sourcePath);
/* eslint-disable-next-line prefer-template */
const output = '// auto-generated\n' + 'export const val = `' + data + '`;\n';

writeFileSync(destPath, output);
Expand Down Expand Up @@ -101,7 +100,6 @@ function createCatalogue(categories) {
} else if (category.name === 'tier3') {
size = 30;
}
/* eslint-disable-next-line prefer-template */
output += `## ${category.name}\n\n` + 'Size: `' + size + 'px` x `' + size + '`px\n\n';

const numCols = 3;
Expand Down
39 changes: 11 additions & 28 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
import { fileURLToPath } from 'node:url';
import { FlatCompat } from '@eslint/eslintrc';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import path from 'node:path';
import { addExtensions, litConfig, nodeConfig, setDirectoryConfigs, testingConfig } from 'eslint-config-brightspace';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
const gitignorePath = path.resolve(__dirname, '.gitignore');
const files = ['**/*.js', '**/*.html'];
export default [
includeIgnoreFile(gitignorePath),
...compat.extends('brightspace/lit-config').map(c => ({
...c,
files: c.files ?? files
})),
{
ignores: ['.vdiff']
},
...setDirectoryConfigs(
addExtensions(litConfig, ['.js', '.html']),
{
'**/test':testingConfig,
cli: nodeConfig
}
),
{
languageOptions: {
globals: {
Prism: false,
},
},
},
...compat.extends('brightspace/testing-config').map(config => ({
...config,
files: ['**/test/*'],
})),
...compat.extends('brightspace/node-config').map(config => ({
...config,
files: ['cli/*'],
rules: { 'no-console':0 }
})),
];
Loading

0 comments on commit 3442cc0

Please sign in to comment.