Skip to content

Commit cc6099f

Browse files
authored
chore: standardize file name capitalization (#167)
1 parent db4b81c commit cc6099f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+470
-477
lines changed

eslint.config.mjs

+21-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import unjs from 'eslint-config-unjs';
33
export default unjs({
44
rules: {
55
'@typescript-eslint/naming-convention': 'off',
6-
"@typescript-eslint/no-duplicate-enum-values": 'off',
6+
'@typescript-eslint/no-duplicate-enum-values': 'off',
77
'@typescript-eslint/semi': 'off',
88
'curly': ['error', 'all'],
99
'eqeqeq': 'warn',
@@ -23,6 +23,26 @@ export default unjs({
2323
'prefer-const': ['error', { destructuring: 'any', ignoreReadBeforeAssign: false }],
2424
'require-await': 'error',
2525
'sort-imports': ['error', { ignoreDeclarationSort: true }],
26+
'no-unused-vars': 'off',
27+
'@typescript-eslint/no-unused-vars': 'off',
28+
'no-template-curly-in-string': 'off',
29+
'array-callback-return': 'off',
30+
'camelcase': 'off',
31+
'no-console': 'off',
32+
'quotes': ['error', 'single'],
33+
'comma-spacing': ['error', { before: false, after: true }],
34+
'keyword-spacing': ['error', { before: true, after: true }],
35+
'space-before-function-paren': ['error', 'always'],
36+
'object-curly-spacing': ['error', 'always'],
37+
'arrow-spacing': ['error', { before: true, after: true }],
38+
'key-spacing': ['error', { beforeColon: false, afterColon: true, mode: 'strict' }],
39+
'space-before-blocks': ['error', 'always'],
40+
'space-infix-ops': ['error', { int32Hint: false }],
41+
'@typescript-eslint/no-explicit-any': 'off',
42+
'@typescript-eslint/ban-types': 'off',
43+
'@typescript-eslint/ban-ts-comment': 'off',
44+
'@typescript-eslint/no-extraneous-class': 'off',
45+
'comma-dangle': 'off',
2646
},
2747
ignores: [
2848
'out',

knip.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ const config: KnipConfig = {
1313
ignoreDependencies: ['ofetch', '@types/vscode-webview', 'prettier', 'prettier-plugin-tailwindcss'],
1414
ignore: ['build/**', 'prettier.config.ts'],
1515
vite: {
16-
"config": [
17-
"vite.config.ts"
16+
'config': [
17+
'vite.config.ts'
1818
]
1919
}
2020
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/codelens/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { languages } from 'vscode';
2-
import { ModulesCodelensProvider } from './modules'
3-
import { PluginsCodelensProvider } from './plugins'
4-
import { LayersCodeLensProvider } from './layers'
2+
import { LayersCodeLensProvider } from './layers';
3+
import { ModulesCodelensProvider } from './modules';
4+
import { PluginsCodelensProvider } from './plugins';
55

6-
function activateCodelenses() {
6+
function activateCodelenses () {
77
const modulesLens = new ModulesCodelensProvider()
88
const pluginsLens = new PluginsCodelensProvider()
99
const layersLens = new LayersCodeLensProvider()

src/codelens/layers.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ export class LayersCodeLensProvider implements CodeLensProvider {
77
private _onDidChangeCodeLenses: EventEmitter<void> = new EventEmitter<void>()
88
public readonly onDidChangeCodeLenses: Event<void> = this._onDidChangeCodeLenses.event
99

10-
constructor() {
10+
constructor () {
1111
this.regex = /extends:/g,
1212

1313
workspace.onDidChangeConfiguration((_) => { this._onDidChangeCodeLenses.fire() })
1414
}
1515

16-
public provideCodeLenses(document: TextDocument): CodeLens[] | Thenable<CodeLens[]> {
16+
public provideCodeLenses (document: TextDocument): CodeLens[] | Thenable<CodeLens[]> {
1717

1818
this.codeLenses = []
1919
const regex = new RegExp(this.regex)
@@ -31,13 +31,13 @@ export class LayersCodeLensProvider implements CodeLensProvider {
3131
return this.codeLenses
3232
}
3333

34-
public resolveCodeLens(codeLens: CodeLens) {
35-
if (workspace.getConfiguration("codelens-sample").get("enableCodeLens", true)) {
34+
public resolveCodeLens (codeLens: CodeLens) {
35+
if (workspace.getConfiguration('codelens-sample').get('enableCodeLens', true)) {
3636
codeLens.command = {
3737
title: 'Add new layer',
38-
tooltip: "Nuxtr: Add new layer",
38+
tooltip: 'Nuxtr: Add new layer',
3939
command: 'nuxtr.createLayer',
40-
arguments: ["Argument 1", false]
40+
arguments: ['Argument 1', false]
4141
}
4242
return codeLens
4343
}

src/codelens/modules.ts

+7-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
import {
2-
CodeLens,
3-
CodeLensProvider,
4-
Event,
5-
EventEmitter,
6-
Position,
7-
TextDocument,
8-
workspace,
9-
} from 'vscode';
1+
import { CodeLens, CodeLensProvider, Event, EventEmitter, Position, TextDocument, workspace } from 'vscode';
102

113
export class ModulesCodelensProvider implements CodeLensProvider {
124

@@ -15,15 +7,15 @@ export class ModulesCodelensProvider implements CodeLensProvider {
157
private _onDidChangeCodeLenses: EventEmitter<void> = new EventEmitter<void>()
168
public readonly onDidChangeCodeLenses: Event<void> = this._onDidChangeCodeLenses.event
179

18-
constructor() {
10+
constructor () {
1911
this.regex = /modules:/g
2012

2113
workspace.onDidChangeConfiguration((_) => {
2214
this._onDidChangeCodeLenses.fire()
2315
})
2416
}
2517

26-
public provideCodeLenses(document: TextDocument): CodeLens[] | Thenable<CodeLens[]> {
18+
public provideCodeLenses (document: TextDocument): CodeLens[] | Thenable<CodeLens[]> {
2719

2820
this.codeLenses = []
2921
const regex = new RegExp(this.regex)
@@ -41,13 +33,13 @@ export class ModulesCodelensProvider implements CodeLensProvider {
4133
return this.codeLenses
4234
}
4335

44-
public resolveCodeLens(codeLens: CodeLens) {
45-
if (workspace.getConfiguration("codelens-sample").get("enableCodeLens", true)) {
36+
public resolveCodeLens (codeLens: CodeLens) {
37+
if (workspace.getConfiguration('codelens-sample').get('enableCodeLens', true)) {
4638
codeLens.command = {
4739
title: 'Add new module',
48-
tooltip: "Tooltip provided by sample extension",
40+
tooltip: 'Tooltip provided by sample extension',
4941
command: 'nuxtr.createModuleAction',
50-
arguments: ["Argument 1", false]
42+
arguments: ['Argument 1', false]
5143
}
5244
return codeLens
5345
}

src/codelens/plugins.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ export class PluginsCodelensProvider implements CodeLensProvider {
77
private _onDidChangeCodeLenses: EventEmitter<void> = new EventEmitter<void>()
88
public readonly onDidChangeCodeLenses: Event<void> = this._onDidChangeCodeLenses.event
99

10-
constructor() {
10+
constructor () {
1111
this.regex = /plugins:/g
1212

1313
workspace.onDidChangeConfiguration((_) => {
1414
this._onDidChangeCodeLenses.fire()
1515
})
1616
}
1717

18-
public provideCodeLenses(document: TextDocument): CodeLens[] | Thenable<CodeLens[]> {
18+
public provideCodeLenses (document: TextDocument): CodeLens[] | Thenable<CodeLens[]> {
1919

20-
if (workspace.getConfiguration("codelens-sample").get("enableCodeLens", true)) {
20+
if (workspace.getConfiguration('codelens-sample').get('enableCodeLens', true)) {
2121
this.codeLenses = []
2222
const regex = new RegExp(this.regex)
2323
const text = document.getText()
@@ -36,13 +36,13 @@ export class PluginsCodelensProvider implements CodeLensProvider {
3636
return []
3737
}
3838

39-
public resolveCodeLens(codeLens: CodeLens) {
40-
if (workspace.getConfiguration("codelens-sample").get("enableCodeLens", true)) {
39+
public resolveCodeLens (codeLens: CodeLens) {
40+
if (workspace.getConfiguration('codelens-sample').get('enableCodeLens', true)) {
4141
codeLens.command = {
4242
title: 'Add new plugin',
4343
command: 'nuxtr.createPlugin',
44-
tooltip: "Tooltip provided by sample extension",
45-
arguments: ["Argument 1", false]
44+
tooltip: 'Tooltip provided by sample extension',
45+
arguments: ['Argument 1', false]
4646
}
4747
return codeLens
4848
}

src/commands/CSS.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum VuetifyOptions {
2020
createConfigFile = 'Create Vuetify config file',
2121
}
2222

23-
function configureCSS() {
23+
function configureCSS () {
2424
window
2525
.showQuickPick(frameworks, {
2626
canPickMany: false,
@@ -85,7 +85,7 @@ const configureTailwind = () => {
8585
const filePath = `${await projectSrcDirectory()}/assets/css/tailwind.css`
8686

8787
await createFile({
88-
fileName: `tailwind.css`,
88+
fileName: 'tailwind.css',
8989
content: tailwindCSSFile,
9090
fullPath: filePath,
9191
})
@@ -144,7 +144,7 @@ const configureUno = async () => {
144144

145145
if (selections.includes(UnoCSSOptions.createConfigFile)) {
146146
await createFile({
147-
fileName: `uno.config.ts`,
147+
fileName: 'uno.config.ts',
148148
content: unoCSSConfig,
149149
fullPath: filePath,
150150
})
@@ -192,7 +192,7 @@ const configureVuetify = async () => {
192192

193193
if (selections.includes(VuetifyOptions.createConfigFile)) {
194194
await createFile({
195-
fileName: `vuetify.config.ts`,
195+
fileName: 'vuetify.config.ts',
196196
content: vuetifyConfigFile,
197197
fullPath: filePath,
198198
})

src/commands/Component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { window } from 'vscode'
1+
import { window } from 'vscode';
22
import { createDir, createFile, createSubFolders, generateVueFileBasicTemplate, projectSrcDirectory, showSubFolderQuickPick, } from '../utils';
33

44
const createComponent = () => {
@@ -44,4 +44,4 @@ const directCreateComponent = (path: string) => {
4444
})
4545
}
4646

47-
export { createComponent, directCreateComponent }
47+
export { createComponent, directCreateComponent };

src/commands/Composable.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { window } from 'vscode'
2-
import { createDir, createFile, createSubFolders, normalizeFileExtension, projectSrcDirectory, showSubFolderQuickPick } from '../utils'
32
import { composableTemplate } from '../templates'
3+
import { createDir, createFile, createSubFolders, normalizeFileExtension, projectSrcDirectory, showSubFolderQuickPick } from '../utils'
44

55
const createComposable = () => {
66
window
77
.showInputBox({
88
prompt: 'What is your composable name?',
99
placeHolder: 'composable name',
1010
})
11-
.then(async(name) => {
11+
.then(async (name) => {
1212

1313
if (!name) { return }
1414

0 commit comments

Comments
 (0)