Skip to content

Commit

Permalink
Updated README.md, reverted test svg, fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kcaran committed Oct 30, 2023
1 parent 322802b commit 7e90203
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ linting.on("done", () => {
## Config

In order to specify what should be linted SVGLint must be given a configuration object.
If you are using the CLI, this configuration object is read from the file specified by `--config`. This defaults to `.svglintrc.js`, which will be searched for up through the directory tree - this is similar to tools such as ESLint. If no configuration file is found searching up the directory tree, a configuration file located in the user's home directory is used (i.e. "$HOME/.svglintrc.js" on Unix-like systems).
If you are using the CLI, this configuration object is read from the file specified by `--config`. This defaults to `.svglintrc.js`, which will be searched for up through the directory tree, or in the user's home directory (e.g. `~/.svglintrc.js` on Unix-like systems) - this is similar to tools such as ESLint.

This configuration file should export a single object, of the format:

Expand Down
7 changes: 3 additions & 4 deletions src/cli/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ async function getConfigurationInHomedir() {

const homedirFile = path.join(os.homedir(), ".svglintrc.js");
if (await fileExists(homedirFile)) {
filepath = homedirFile;
filepath = homedirFile;
}

return filepath;
}
return filepath;
}

/**
* Get the configuration file to use
Expand All @@ -109,7 +109,6 @@ async function getConfigurationFile(filename, folder) {
}
}

// Look at parent directories or, finally, the user's home directory
filepath = await getDefaultConfigurationFileTraversingParents(folder);
if (filepath) {
return filepath;
Expand Down
4 changes: 2 additions & 2 deletions test/svgs/attr.test.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7e90203

Please sign in to comment.