Skip to content

Commit ba6a910

Browse files
committed
chore: upgrade eslint
1 parent 80da489 commit ba6a910

5 files changed

Lines changed: 32 additions & 29 deletions

File tree

eslint.config.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import js from "@eslint/js";
22
import globals from "globals";
33
import tseslint from "typescript-eslint";
44
import vitest from "@vitest/eslint-plugin";
5-
import stylistic from "@stylistic/eslint-plugin-ts";
5+
import stylistic from "@stylistic/eslint-plugin";
66
import {defineConfig} from "eslint/config";
77

88
export default defineConfig([
@@ -31,7 +31,7 @@ export default defineConfig([
3131
files: ["**/*.{ts,mts,cts}"],
3232
plugins: {
3333
"@typescript-eslint": tseslint.plugin,
34-
"@stylistic/ts": stylistic,
34+
"@stylistic": stylistic,
3535
},
3636
languageOptions: {
3737
parser: tseslint.parser,
@@ -75,11 +75,11 @@ export default defineConfig([
7575
"lines-around-comment": "off",
7676

7777
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
78-
'@stylistic/ts/object-curly-spacing': ['warn', 'always'],
79-
"@stylistic/ts/indent": ["warn", 4],
80-
"@stylistic/ts/quotes": ["warn", "single"],
81-
"@stylistic/ts/semi": "error",
82-
"@stylistic/ts/no-extra-parens": "error",
78+
'@stylistic/object-curly-spacing': ['warn', 'always'],
79+
"@stylistic/indent": ["warn", 4],
80+
"@stylistic/quotes": ["warn", "single"],
81+
"@stylistic/semi": "error",
82+
"@stylistic/no-extra-parens": "error",
8383
"@typescript-eslint/no-unused-vars": "warn",
8484
"@typescript-eslint/no-useless-constructor": "warn",
8585
"@typescript-eslint/no-explicit-any": "off",
@@ -91,19 +91,19 @@ export default defineConfig([
9191
"@typescript-eslint/prefer-optional-chain": "warn",
9292
"@typescript-eslint/prefer-ts-expect-error": "warn",
9393
"@typescript-eslint/promise-function-async": "error",
94-
"@stylistic/ts/func-call-spacing": ["error", "never"],
95-
"@stylistic/ts/comma-spacing": "warn",
96-
"@stylistic/ts/keyword-spacing": "warn",
94+
"@stylistic/function-call-spacing": ["error", "never"],
95+
"@stylistic/comma-spacing": "warn",
96+
"@stylistic/keyword-spacing": "warn",
9797
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
9898
"@typescript-eslint/consistent-type-imports": ["error", {prefer: 'type-imports'}],
99-
"@stylistic/ts/member-delimiter-style": "warn",
100-
"@stylistic/ts/type-annotation-spacing": "warn",
99+
"@stylistic/member-delimiter-style": "warn",
100+
"@stylistic/type-annotation-spacing": "warn",
101101
"@typescript-eslint/naming-convention": "error",
102102
"@typescript-eslint/no-magic-numbers": "off",
103103
"@typescript-eslint/no-non-null-assertion": "off",
104104
"@typescript-eslint/member-ordering": "off",
105105
"@typescript-eslint/class-literal-property-style": "off",
106-
"@stylistic/ts/space-before-function-paren": ["warn", {
106+
"@stylistic/space-before-function-paren": ["warn", {
107107
"anonymous": "always",
108108
"named": "never",
109109
"asyncArrow": "always"
@@ -121,11 +121,11 @@ export default defineConfig([
121121
"@typescript-eslint/array-type": "warn",
122122
"@typescript-eslint/prefer-for-of": "off",
123123
"@typescript-eslint/no-restricted-imports": "off",
124-
"@stylistic/ts/lines-between-class-members": ["error"],
124+
"@stylistic/lines-between-class-members": ["error"],
125125
"@typescript-eslint/max-params": ["warn", {
126126
"max": 5
127127
}],
128-
"@stylistic/ts/lines-around-comment": ["warn", {
128+
"@stylistic/lines-around-comment": ["warn", {
129129
"allowInterfaceStart": true,
130130
"allowBlockStart": true,
131131
"allowModuleStart": true,

package-lock.json

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"@rollup/plugin-terser": "^0.4.0",
117117
"@rollup/plugin-typescript": "^12.1.1",
118118
"@semantic-release/git": "^10.0.0",
119-
"@stylistic/eslint-plugin-ts": "^4.2.0",
119+
"@stylistic/eslint-plugin": "^5.4.0",
120120
"@tsconfig/strictest": "^2.0.5",
121121
"@types/lodash.clonedeep": "^4.5.7",
122122
"@types/lodash.isequal": "^4.5.6",

src/Calliope/Concerns/HasAttributes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type AttributeKeys<T, Ex = CallableFunction> = Exclude<KeysNotMatching<T,
3131
* Results in a union of keys.
3232
*/
3333
export type SimpleAttributeKeys<T extends HasAttributes = HasAttributes> =
34-
AttributeKeys<T, CallableFunction | (Model | ModelCollection<Model> | undefined)>;
34+
AttributeKeys<T, CallableFunction | Model | ModelCollection<Model> | undefined>;
3535

3636

3737
/**

src/Support/Collection.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class Collection<T> implements Jsonable, Arrayable<T>, Iterable<T
103103
*
104104
* @return {undefined|any}
105105
*/
106-
public first(callback?: ((item: T, index: number) => boolean)): T | undefined {
106+
public first(callback?: (item: T, index: number) => boolean): T | undefined {
107107
if (this.isEmpty()) {
108108
return undefined;
109109
}
@@ -124,7 +124,7 @@ export default class Collection<T> implements Jsonable, Arrayable<T>, Iterable<T
124124
*
125125
* @return {undefined|any}
126126
*/
127-
public last(callback?: ((item: T, index: number) => boolean)): T | undefined {
127+
public last(callback?: (item: T, index: number) => boolean): T | undefined {
128128
if (this.isEmpty()) {
129129
return undefined;
130130
}
@@ -526,7 +526,7 @@ export default class Collection<T> implements Jsonable, Arrayable<T>, Iterable<T
526526
*
527527
* @param callback
528528
*/
529-
public partition(callback: ((item: T) => boolean)): [this, this] {
529+
public partition(callback: (item: T) => boolean): [this, this] {
530530
const left = this._newInstance();
531531
const right = this._newInstance();
532532

@@ -1074,7 +1074,7 @@ export default class Collection<T> implements Jsonable, Arrayable<T>, Iterable<T
10741074
* @return {Collection}
10751075
*/
10761076
public flatMap<U, This = undefined>(
1077-
callback: (this: This, value: T, index: number, array: T[]) => (U | readonly U[]),
1077+
callback: (this: This, value: T, index: number, array: T[]) => U | readonly U[],
10781078
thisArg?: This
10791079
): Collection<U> {
10801080
return new Collection(this.toArray().flatMap(callback, thisArg));

0 commit comments

Comments
 (0)