Skip to content

Commit

Permalink
fix: Update templates to eslint9
Browse files Browse the repository at this point in the history
  • Loading branch information
GZolla authored Nov 29, 2024
2 parents cd990d8 + 97e6511 commit db7fb32
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"repository": "https://github.com/<%= githubOrg %>/<%= hyphenatedName %>.git",
"scripts": {
"lint": "npm run lint:eslint && npm run lint:style",
"lint:eslint": "eslint . --ext .js,.html",
"lint:eslint": "eslint .",
"lint:style": "stylelint \"**/*.{js,html}\""
},
"author": "D2L Corporation",
"license": "Apache-2.0",
"devDependencies": {
"@brightspace-ui/stylelint-config": "^1",
"eslint": "^8",
"eslint-config-brightspace": "^1",
"eslint": "^9",
"eslint-config-brightspace": "^2",
"stylelint": "^16"
},
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { addExtensions, litConfig, setDirectoryConfigs, testingConfig } from 'eslint-config-brightspace';

export default setDirectoryConfigs(
addExtensions(litConfig, ['.js', '.html']),
{
test: testingConfig
}
);
4 changes: 0 additions & 4 deletions src/generators/test-unit-axe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export function run(templateData) {
);
}

copyFile(
`${__dirname}/templates/static/test/.eslintrc.json`,
`${getDestinationPath(templateData.hyphenatedName)}/test/.eslintrc.json`
);
replaceText(`${getDestinationPath(templateData.hyphenatedName)}/test/${templateData.hyphenatedName}.test.js`, templateData);
replaceText(`${getDestinationPath(templateData.hyphenatedName)}/test/${templateData.hyphenatedName}.axe.js`, templateData);
sortJSONMembers(`${getDestinationPath(templateData.hyphenatedName)}/package.json`, ['dependencies', 'devDependencies']);
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions src/generators/wc-lit-element/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { copyFile, copyFilesInDir, getDestinationPath, mergeJSON, replaceText, sortJSONMembers } from '../../helper.js';
import { copyFile, getDestinationPath, mergeJSON, replaceText, sortJSONMembers } from '../../helper.js';

export function run(templateData) {
mergeJSON(
Expand All @@ -19,6 +19,5 @@ export function run(templateData) {
);
replaceText(`${getDestinationPath(templateData.hyphenatedName)}/${templateData.hyphenatedName}.js`, templateDataElement);

copyFilesInDir(`${__dirname}/templates/static`, getDestinationPath(templateData.hyphenatedName));
sortJSONMembers(`${getDestinationPath(templateData.hyphenatedName)}/package.json`, ['dependencies', 'devDependencies']);
}
3 changes: 0 additions & 3 deletions src/generators/wc-lit-element/templates/static/.eslintrc.json

This file was deleted.

0 comments on commit db7fb32

Please sign in to comment.