Skip to content

Commit f30034e

Browse files
authored
Add type to config (#161)
1 parent 302dea6 commit f30034e

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.eslintrc.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1-
module.exports = {
1+
// @ts-check
2+
3+
// eslint-disable-next-line jsdoc/valid-types -- https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
4+
/** @typedef {import('eslint').ESLint.ConfigData} ConfigData */
5+
6+
/**
7+
* @type {ConfigData}
8+
* @see https://eslint.org/docs/latest/use/configure/configuration-files
9+
*/
10+
const config = {
211
extends: './index.js',
312
rules: {
413
'unicorn/prefer-module': 'off'
514
}
615
}
16+
17+
module.exports = config

index.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
module.exports = {
1+
// @ts-check
2+
3+
// eslint-disable-next-line jsdoc/valid-types -- https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html
4+
/** @typedef {import('eslint').ESLint.ConfigData} ConfigData */
5+
6+
/**
7+
* @type {ConfigData}
8+
* @see https://eslint.org/docs/latest/use/configure/configuration-files
9+
*/
10+
const config = {
211
extends: [
312
'standard-with-typescript',
413
'plugin:unicorn/recommended',
@@ -29,3 +38,5 @@ module.exports = {
2938
}
3039
]
3140
}
41+
42+
module.exports = config

0 commit comments

Comments
 (0)