Skip to content

Commit

Permalink
Support flat config format (#32)
Browse files Browse the repository at this point in the history
* Support flat config format

Without the schema, you get an error like this:

```
Error: Key "rules": Key "no-relative-import-paths/no-relative-import-paths":
	Value [{"allowSameFolder":true}] should NOT have more than 0 items.
```

* Convert tabs to spaces
  • Loading branch information
Tenrys committed Apr 7, 2024
1 parent fb6aee5 commit 2c2b1ea
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ module.exports = {
meta: {
type: "layout",
fixable: "code",
schema: {
type: "array",
minItems: 0,
maxItems: 1,
items: [
{
type: "object",
properties: {
allowSameFolder: { type: "boolean" },
rootDir: { type: "string" },
prefix: { type: "string" },
},
additionalProperties: false,
},
],
},
},
create: function (context) {
const { allowSameFolder, rootDir, prefix } = {
Expand Down

0 comments on commit 2c2b1ea

Please sign in to comment.