forked from standard/ts-standard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.js
30 lines (26 loc) · 804 Bytes
/
options.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { readFileSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import eslint from 'eslint'
import { DEFAULT_EXTENSIONS } from './constants.js'
// eslintConfig.overrideConfigFile have problem reading URLs and file:///
const overrideConfigFile = fileURLToPath(new URL('./eslintrc.json', import.meta.url))
const pkgURL = new URL('./package.json', import.meta.url)
const pkgJSON = readFileSync(pkgURL, { encoding: 'utf-8' })
const pkg = JSON.parse(pkgJSON)
export default {
bugs: pkg.bugs.url,
cmd: 'ts-standard',
eslint,
eslintConfig: {
overrideConfigFile,
extensions: DEFAULT_EXTENSIONS,
overrideConfig: {
parserOptions: {
project: undefined
}
}
},
homepage: pkg.homepage,
tagline: 'Standard for TypeScript!',
version: pkg.version
}