-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: Similarly to https://github.com/standard/standard/releases/tag/v17.0.0
- Loading branch information
Showing
4 changed files
with
47 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
/*! semistandard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
// programmatic usage | ||
import engine from 'standard-engine' | ||
import opts from './options.js' | ||
/*! standard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
import { StandardEngine } from 'standard-engine' | ||
import options from './options.js' | ||
|
||
const Linter = engine.linter | ||
|
||
export default new Linter(opts) | ||
export default new StandardEngine(options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import { fileURLToPath } from 'node:url' | ||
import { readFileSync } from 'node:fs' | ||
import { fileURLToPath } from 'node:url' | ||
import eslint from 'eslint' | ||
|
||
const pkgUrl = new URL('./package.json', import.meta.url) | ||
const pkg = JSON.parse(readFileSync(pkgUrl, 'utf-8')) | ||
// 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 { | ||
// cmd, homepage, bugs all pulled from package.json | ||
cmd: 'semistandard', | ||
version: pkg.version, | ||
homepage: pkg.homepage, | ||
bugs: pkg.bugs.url, | ||
tagline: 'Semicolons For All!', | ||
cmd: 'semistandard', | ||
eslint, | ||
eslintConfig: { | ||
configFile: fileURLToPath(new URL('eslintrc.json', import.meta.url)) | ||
} | ||
overrideConfigFile | ||
}, | ||
homepage: pkg.homepage, | ||
tagline: 'Semicolons For All!', | ||
version: pkg.version | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters