File tree 5 files changed +31
-14
lines changed
5 files changed +31
-14
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import importPlugin from "eslint-plugin-import";
2
2
import js from "@eslint/js" ;
3
3
import prettier from "eslint-config-prettier" ;
4
4
import jsdoc from "eslint-plugin-jsdoc" ;
5
+ import sortClassMembers from "eslint-plugin-sort-class-members" ;
5
6
import unicorn from "eslint-plugin-unicorn" ;
6
7
import webComponents from "eslint-plugin-wc" ;
7
8
import globals from "globals" ;
@@ -10,6 +11,7 @@ export default [
10
11
importPlugin . flatConfigs . recommended ,
11
12
js . configs . recommended ,
12
13
jsdoc . configs [ "flat/recommended" ] ,
14
+ sortClassMembers . configs [ "flat/recommended" ] ,
13
15
unicorn . configs [ "recommended" ] ,
14
16
webComponents . configs [ "flat/recommended" ] ,
15
17
{
Original file line number Diff line number Diff line change 82
82
"eslint-config-prettier" : " ^10.0.0" ,
83
83
"eslint-plugin-import" : " ^2.31.0" ,
84
84
"eslint-plugin-jsdoc" : " ^50.0.0" ,
85
+ "eslint-plugin-sort-class-members" : " ^1.21.0" ,
85
86
"eslint-plugin-unicorn" : " ^57.0.0" ,
86
87
"eslint-plugin-wc" : " ^2.1.0" ,
87
88
"jsdom" : " ^26.0.0" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,11 @@ export default class ImageEndpoint {
16
16
this . mountPath = this . options . mountPath ;
17
17
}
18
18
19
+ init ( Indiekit ) {
20
+ Indiekit . addEndpoint ( this ) ;
21
+ Indiekit . config . application . imageEndpoint = this . options . mountPath ;
22
+ }
23
+
19
24
_routes ( indiekitConfig ) {
20
25
const ipx = createIPX ( {
21
26
storage : ipxFSStorage ( { dir : "./public" } ) ,
@@ -26,9 +31,4 @@ export default class ImageEndpoint {
26
31
27
32
return router ;
28
33
}
29
-
30
- init ( Indiekit ) {
31
- Indiekit . addEndpoint ( this ) ;
32
- Indiekit . config . application . imageEndpoint = this . options . mountPath ;
33
- }
34
34
}
Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ const package_ = require("./package.json");
22
22
const debug = makeDebug ( `indiekit:index` ) ;
23
23
24
24
export const Indiekit = class {
25
+ static async initialize ( options = { } ) {
26
+ const config = await getIndiekitConfig ( {
27
+ config : options . config ,
28
+ configFilePath : options . configFilePath ,
29
+ } ) ;
30
+
31
+ return new Indiekit ( config ) ;
32
+ }
33
+
25
34
/**
26
35
* @private
27
36
* @param {object } config - Indiekit configuration
@@ -42,15 +51,6 @@ export const Indiekit = class {
42
51
this . validationSchemas = new Map ( ) ;
43
52
}
44
53
45
- static async initialize ( options = { } ) {
46
- const config = await getIndiekitConfig ( {
47
- config : options . config ,
48
- configFilePath : options . configFilePath ,
49
- } ) ;
50
-
51
- return new Indiekit ( config ) ;
52
- }
53
-
54
54
addCollection ( name ) {
55
55
if ( this . collections . has ( name ) ) {
56
56
console . warn ( `Collection ‘${ name } ’ already added` ) ;
You can’t perform that action at this time.
0 commit comments