File tree Expand file tree Collapse file tree 9 files changed +11477
-59
lines changed Expand file tree Collapse file tree 9 files changed +11477
-59
lines changed Original file line number Diff line number Diff line change
1
+ const baseConfiguration = require ( '@wordpress/scripts/config/.eslintrc.js' ) ;
2
+
3
+ module . exports = {
4
+ ...baseConfiguration ,
5
+ settings : {
6
+ 'import/resolver' : {
7
+ typescript : { } ,
8
+ } ,
9
+ } ,
10
+ } ;
Original file line number Diff line number Diff line change 3
3
/coverage
4
4
/vendor /
5
5
/node_modules /
6
+
7
+ composer.lock
Original file line number Diff line number Diff line change
1
+ const prettierConfig = require ( '@wordpress/scripts/config/.prettierrc.js' )
2
+
3
+ module . exports = prettierConfig
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
/** @type {import('ts-jest').JestConfigWithTsJest } */
2
2
module . exports = {
3
- preset : 'ts-jest' ,
4
- testEnvironment : 'node ' ,
5
- moduleDirectories : [ 'node_modules' ] ,
6
- }
3
+ preset : 'ts-jest' ,
4
+ testEnvironment : 'jsdom ' ,
5
+ moduleDirectories : [ 'node_modules' ] ,
6
+ } ;
Original file line number Diff line number Diff line change 6
6
"main" : " ./sources/js/src/index.ts" ,
7
7
"types" : " ./sources/js/src/@types/index.d.ts" ,
8
8
"license" : " GPL-2.0-or-later" ,
9
+ "engines" : {
10
+ "node" : " 16"
11
+ },
9
12
"devDependencies" : {
10
13
"@faker-js/faker" : " ^7.6.0" ,
11
14
"@jest/globals" : " ^29.4.3" ,
12
15
"@total-typescript/shoehorn" : " ^0.1.0" ,
13
16
"@trivago/prettier-plugin-sort-imports" : " ^4.0.0" ,
14
17
"@wordpress/dependency-extraction-webpack-plugin" : " ^4.8.0" ,
15
18
"@wordpress/env" : " ^5.9.0" ,
19
+ "@wordpress/eslint-plugin" : " ^14.8.0" ,
16
20
"@wordpress/scripts" : " ^25.1.0" ,
21
+ "eslint-import-resolver-typescript" : " ^3.5.5" ,
17
22
"jest" : " ^29.4.3" ,
18
23
"prettier" : " ^2.8.1" ,
19
24
"ts-jest" : " ^29.0.5" ,
36
41
"build" : " wp-scripts build --webpack-src-dir=./sources/js/src" ,
37
42
"build:dev" : " wp-scripts build --mode=development --webpack-src-dir=./sources/js/src" ,
38
43
"cs:fix" : " wp-scripts format ./sources/js" ,
44
+ "lint:js" : " wp-scripts lint-js" ,
45
+ "lint:js:fix" : " wp-scripts lint-js --fix" ,
39
46
"test" : " jest"
40
47
}
41
48
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
+ "alwaysStrict" : true ,
4
+ "exactOptionalPropertyTypes" : true ,
5
+ "noFallthroughCasesInSwitch" : true ,
6
+ "noImplicitAny" : true ,
7
+ "noImplicitOverride" : true ,
8
+ "noImplicitReturns" : true ,
9
+ "noImplicitThis" : true ,
10
+ "noPropertyAccessFromIndexSignature" : true ,
11
+ "noUncheckedIndexedAccess" : true ,
12
+ "noUnusedLocals" : true ,
13
+ "noUnusedParameters" : true ,
14
+ "strict" : true ,
15
+ "useUnknownInCatchVariables" : true ,
3
16
"resolveJsonModule" : true ,
4
17
"sourceMap" : true ,
5
18
"jsx" : " react" ,
6
- "noImplicitThis" : true ,
7
- "strictNullChecks" : true ,
8
- "alwaysStrict" : true ,
9
19
"skipLibCheck" : true ,
10
20
"esModuleInterop" : true ,
11
21
"baseUrl" : " ." ,
12
22
"paths" : {
13
- "@types" : [
23
+ "@entities-search- types" : [
14
24
" ./sources/js/src/@types"
15
25
],
16
26
"@entities-search" : [
17
27
" ./sources/js/src"
18
- ],
28
+ ]
19
29
},
20
30
},
21
31
"include" : [
22
- " ./ sources/js/**/*" ,
23
- " ./ tests/js/**/*"
32
+ " sources/js/**/*" ,
33
+ " tests/js/**/*"
24
34
],
25
35
"exclude" : [
26
36
" node_modules"
Original file line number Diff line number Diff line change 1
- const path = require ( 'path' )
2
- const baseConfiguration = require ( '@wordpress/scripts/config/webpack.config' )
3
- const DependencyExtractionWebpackPlugin = require ( '@wordpress/dependency-extraction-webpack-plugin' )
1
+ const path = require ( 'path' ) ;
2
+ const baseConfiguration = require ( '@wordpress/scripts/config/webpack.config' ) ;
3
+ const DependencyExtractionWebpackPlugin = require ( '@wordpress/dependency-extraction-webpack-plugin' ) ;
4
4
5
5
module . exports = {
6
- ...baseConfiguration ,
7
- plugins : [
8
- ...baseConfiguration . plugins . filter (
9
- plugin => plugin . constructor . name !== 'DependencyExtractionWebpackPlugin'
10
- ) ,
11
- new DependencyExtractionWebpackPlugin ( {
12
- outputFormat : 'json' ,
13
- } ) ,
14
- ] ,
15
- resolve : {
16
- extensions : [ '.ts' , '.tsx' ] ,
17
- alias : {
18
- '@entities-search' : path . resolve ( __dirname , 'sources/js/src' ) ,
19
- '@types' : path . resolve ( __dirname , 'sources/js/src/@types' ) ,
20
- } ,
21
- } ,
22
- }
6
+ ...baseConfiguration ,
7
+ plugins : [
8
+ ...baseConfiguration . plugins . filter (
9
+ ( plugin ) =>
10
+ plugin . constructor . name !== 'DependencyExtractionWebpackPlugin'
11
+ ) ,
12
+ new DependencyExtractionWebpackPlugin ( {
13
+ outputFormat : 'json' ,
14
+ } ) ,
15
+ ] ,
16
+ resolve : {
17
+ extensions : [ '.ts' , '.tsx' ] ,
18
+ alias : {
19
+ '@entities-search' : path . resolve ( __dirname , 'sources/js/src' ) ,
20
+ '@entities-search-types' : path . resolve (
21
+ __dirname ,
22
+ 'sources/js/src/@types'
23
+ ) ,
24
+ } ,
25
+ } ,
26
+ } ;
You can’t perform that action at this time.
0 commit comments