Skip to content

Commit 5f36c26

Browse files
Update eslint-config-minecraft-scripting to lint config files, extend config in core-build-tasks (#78)
1 parent 33e39b8 commit 5f36c26

Some content is hidden

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

42 files changed

+1378
-1387
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "Linting fixes",
4+
"packageName": "@minecraft/api-docs-generator",
5+
"email": "[email protected]",
6+
"dependentChangeType": "none"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "Update coreLint task to run on whole working directory, linting fixes",
4+
"packageName": "@minecraft/core-build-tasks",
5+
"email": "[email protected]",
6+
"dependentChangeType": "none"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "Linting fixes",
4+
"packageName": "@minecraft/markup-generators-plugin",
5+
"email": "[email protected]",
6+
"dependentChangeType": "none"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "Linting fixes",
4+
"packageName": "@minecraft/math",
5+
"email": "[email protected]",
6+
"dependentChangeType": "none"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Update dependencies",
4+
"packageName": "eslint-plugin-minecraft-linting",
5+
"email": "[email protected]",
6+
"dependentChangeType": "none"
7+
}

libraries/math/eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
import configMinecraftScripting from 'eslint-config-minecraft-scripting';
25

36
export default [...configMinecraftScripting];

libraries/math/just.config.cts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
import { execSync } from 'child_process';
25
import { argv, series, task, tscTask } from 'just-scripts';
36
import {
@@ -8,7 +11,7 @@ import {
811
publishReleaseTask,
912
vitestTask,
1013
} from '@minecraft/core-build-tasks';
11-
import { copyFileSync, createWriteStream, readFileSync } from 'node:fs';
14+
import { copyFileSync, readFileSync } from 'node:fs';
1215
import { resolve } from 'node:path';
1316

1417
const isOnlyBuild = argv()._.findIndex(arg => arg === 'test') === -1;

libraries/math/src/vector3/coreHelpers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ export class Vector3Utils {
184184
* @param a - Angle in radians
185185
*/
186186
static rotateX(v: Vector3, a: number): Vector3 {
187-
let cos = Math.cos(a);
188-
let sin = Math.sin(a);
187+
const cos = Math.cos(a);
188+
const sin = Math.sin(a);
189189
return { x: v.x, y: v.y * cos - v.z * sin, z: v.z * cos + v.y * sin };
190190
}
191191

@@ -196,8 +196,8 @@ export class Vector3Utils {
196196
* @param a - Angle in radians
197197
*/
198198
static rotateY(v: Vector3, a: number): Vector3 {
199-
let cos = Math.cos(a);
200-
let sin = Math.sin(a);
199+
const cos = Math.cos(a);
200+
const sin = Math.sin(a);
201201
return { x: v.x * cos + v.z * sin, y: v.y, z: v.z * cos - v.x * sin };
202202
}
203203

@@ -208,8 +208,8 @@ export class Vector3Utils {
208208
* @param a - Angle in radians
209209
*/
210210
static rotateZ(v: Vector3, a: number): Vector3 {
211-
let cos = Math.cos(a);
212-
let sin = Math.sin(a);
211+
const cos = Math.cos(a);
212+
const sin = Math.sin(a);
213213
return { x: v.x * cos - v.y * sin, y: v.y * cos + v.x * sin, z: v.z };
214214
}
215215
}

libraries/math/vite.config.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
/// <reference types="vitest" />
25
import { configDefaults, defineConfig } from 'vitest/config';
36

0 commit comments

Comments
 (0)