Skip to content

Commit 60fe5d5

Browse files
committed
Work around TS1542
1 parent 4116a56 commit 60fe5d5

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
# WordPress Coding Standards
5+
# https://developer.wordpress.org/coding-standards/wordpress-coding-standards/
6+
7+
root = true
8+
9+
[*]
10+
charset = utf-8
11+
end_of_line = lf
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
indent_style = tab
15+
16+
[*.{yml,yaml}]
17+
indent_style = space
18+
indent_size = 2
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[*.txt]
24+
end_of_line = crlf

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* External dependencies
3+
*/
4+
const wpConfig = require( '@wordpress/scripts/config/.eslintrc.js' );
5+
6+
const config = {
7+
...wpConfig,
8+
rules: {
9+
...( wpConfig?.rules || {} ),
10+
'jsdoc/valid-types': 'off',
11+
},
12+
env: {
13+
browser: true,
14+
},
15+
};
16+
17+
module.exports = config;

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @type {import('lint-staged').Configuration}
2+
* @type {import('lint-staged', { with: { 'resolution-mode': 'import' } }).Configuration}
33
*/
44
const config = {
55
'*.{js,ts,mjs}': [ 'npx wp-scripts lint-js', () => 'npx tsc' ],

0 commit comments

Comments
 (0)