Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
289 changes: 0 additions & 289 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"[markdown][mdx]": {
"files.insertFinalNewline": true
},
"[typescript]": {
"[javascript][typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features",
"editor.formatOnSave": true
}
Expand Down
20 changes: 18 additions & 2 deletions eslint-rules/lib/rules/correct-command-class-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function capitalizeWord(word, capitalized) {
return word.substr(0, 1).toUpperCase() + word.substr(1).toLowerCase();
}

function breakWords(longWord, dictionary) {
function breakWords(longWord, dictionary) {
const words = [];
for (let i = 0; i < dictionary.length; i++) {
if (longWord.indexOf(dictionary[i]) === 0) {
Expand Down Expand Up @@ -72,7 +72,23 @@ module.exports = {
fixable: 'code',
messages: {
invalidName: "'{{ actualClassName }}' is not a valid command class name. Expected '{{ expectedClassName }}'"
}
},
schema: [
{
type: 'array',
items: { type: 'string' },
uniqueItems: true,
title: 'dictionary',
description: 'List of known word parts used to break long command names into words.'
},
{
type: 'array',
items: { type: 'string' },
uniqueItems: true,
title: 'capitalized',
description: 'List of known word parts that should be capitalized.'
}
]
},
create: context => {
return {
Expand Down
Loading