Skip to content

Commit da045f1

Browse files
refactor(repo): eslint updates
1 parent c71b058 commit da045f1

File tree

13 files changed

+110
-228
lines changed

13 files changed

+110
-228
lines changed

.eslintrc.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@typescript-eslint/no-non-null-assertion": "off",
3131
"unused-imports/no-unused-imports": "error",
3232
"no-duplicate-imports": "error",
33-
"unused-imports/no-unused-vars": "error",
33+
"@typescript-eslint/no-unused-vars": "error",
3434
"@typescript-eslint/naming-convention": [
3535
"error",
3636
{
@@ -42,16 +42,14 @@
4242
"format": ["PascalCase"]
4343
}
4444
],
45-
"@typescript-eslint/no-extra-semi": "error",
46-
"no-extra-semi": "off"
45+
"no-extra-semi": "error"
4746
}
4847
},
4948
{
5049
"files": ["*.js", "*.jsx"],
5150
"extends": ["plugin:@nx/javascript"],
5251
"rules": {
53-
"@typescript-eslint/no-extra-semi": "error",
54-
"no-extra-semi": "off"
52+
"no-extra-semi": "error"
5553
}
5654
},
5755
{

.github/actions/test/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020

2121
- name: Test
2222
shell: bash
23-
run: npx nx affected --target=test --base=${{ env.NX_BASE }} --head=HEAD
23+
run: npx nx affected --target=test --base=${{ env.NX_BASE }} --head=HEAD ${{ runner.os == 'Windows' && '--maxWorkers=1' }}
2424

2525
- name: E2E Tests
2626
# TODO: temporary disabled e2e on windows

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"@types/semver": "7.5.6",
4545
"@types/tcp-port-used": "1.0.1",
4646
"@types/yargs": "17.0.24",
47-
"@typescript-eslint/eslint-plugin": "7.18.0",
48-
"@typescript-eslint/parser": "7.18.0",
49-
"@typescript-eslint/utils": "^8.13.0",
47+
"@typescript-eslint/eslint-plugin": "^8.19.1",
48+
"@typescript-eslint/parser": "8.19.1",
49+
"@typescript-eslint/utils": "^8.19.1",
5050
"all-contributors-cli": "^6.26.1",
5151
"chalk": "^4.1.2",
5252
"commitizen": "^4.3.0",
@@ -56,7 +56,7 @@
5656
"enquirer": "2.3.6",
5757
"eslint": "8.57.0",
5858
"eslint-config-prettier": "9.0.0",
59-
"eslint-plugin-unused-imports": "2.0.0",
59+
"eslint-plugin-unused-imports": "^4.1.4",
6060
"fs-extra": "11.1.0",
6161
"husky": "^8.0.3",
6262
"is-windows": "1.0.2",

packages/create-qwik-nx/bin/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22

33
import { commandsObject } from './create-qwik-nx';
44

5+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
56
commandsObject.argv;

packages/qwik-nx/src/generators/application/schema.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Linter } from '@nx/eslint';
2-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
32

43
export interface QwikAppGeneratorSchema {
54
directory: string;

packages/qwik-nx/src/generators/host/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { HostGeneratorSchema } from './schema';
1212
import { appGenerator } from './../application/generator';
1313
import remoteGenerator from '../remote/generator';
1414
import { normalizeOptions } from '../application/utils/normalize-options';
15-
import { basename, dirname, join } from 'path';
15+
import { dirname, join } from 'path';
1616
import { addMicroFrontendBetaWarning } from '../../utils/mf-beta-warning';
1717
import { NormalizedSchema } from '../application/schema';
1818

packages/qwik-nx/src/generators/remote/schema.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
2-
31
export interface RemoteGeneratorSchema {
42
name?: string;
53
tags?: string;

packages/qwik-nx/src/generators/setup-tailwind/lib/add-tailwind-style-imports.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ export function addTailwindStyleImports(
2424

2525
if (stylesPath) {
2626
const content = tree.read(stylesPath)?.toString();
27-
content &&
27+
if (content) {
2828
tree.write(
2929
stylesPath,
3030
`@tailwind components;\n@tailwind base;\n@tailwind utilities;\n${content}`
3131
);
32+
}
3233
} else {
3334
logger.warn(
3435
stripIndents`

packages/qwik-nx/src/migrations/add-root-property-to-vite-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { updateViteConfig } from '../utils/update-vite-config';
77
export default function update(host: Tree) {
88
const projects = getProjects(host);
99

10-
projects.forEach((config, name) => {
10+
projects.forEach((config) => {
1111
if (isQwikNxProject(config)) {
1212
const viteConfigPath = normalizeViteConfigFilePathWithTree(
1313
host,

packages/qwik-nx/src/plugins/utils/get-vendor-roots.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ export async function getVendorRoots(
1616
qwikOptions: QwikVitePluginOptionsStub
1717
): Promise<string[]> {
1818
const log = (...str: unknown[]) => {
19-
(options?.debug || qwikOptions.debug) &&
19+
if (options?.debug || qwikOptions.debug) {
2020
console.debug(`[QWIK-NX-VITE PLUGIN:]`, ...str);
21+
}
2122
};
2223

2324
const workspaceConfig = readWorkspaceConfig({ format: 'nx' });

0 commit comments

Comments
 (0)