Skip to content

Commit

Permalink
Merge pull request #26 from Marcisbee/dot-config-folder
Browse files Browse the repository at this point in the history
Move config to .config file
  • Loading branch information
Marcisbee committed Feb 13, 2024
2 parents a5d6d96 + 25e45ef commit 10775e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion marklint.config.json → .config/marklint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "./schemas/config.json",
"$schema": "../schemas/config.json",
"include": [
"*.html",
"*.htm"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "marklint",
"version": "0.6.0",
"version": "0.7.0",
"description": "🗳 HTML/Markup (Vue and Angular template) linter",
"main": "src/index.js",
"tags": [
Expand Down Expand Up @@ -45,7 +45,7 @@
"bin",
"schemas",
"src",
"marklint.config.json",
".config/marklint.json",
"theme.js"
]
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ module.exports = function validator() {
}

try {
const configLocation = resolve(userConfig.config || join(resolve('.'), 'marklint.config.json'));
const configLocation = resolve(userConfig.config || join(resolve('.'), '.config', 'marklint.json'));
Object.assign(defaultConfig, require(configLocation) || {});
} catch (_) {
print(
report({
type: 'log',
severity: 'warning',
message: `No config "marklint.config.json" file found${userConfig.config ? ` at "${userConfig.config}"` : ''}.`,
message: `No config file found at "${userConfig.config || '.config/marklint.json'}".`,
}),
);
}
Expand Down

0 comments on commit 10775e6

Please sign in to comment.