diff --git a/apps/oxlint/test/fixtures/options/.oxlintrc.json b/apps/oxlint/test/fixtures/options/.oxlintrc.json index 6fedc5250e103..974cf9f8d8f22 100644 --- a/apps/oxlint/test/fixtures/options/.oxlintrc.json +++ b/apps/oxlint/test/fixtures/options/.oxlintrc.json @@ -17,5 +17,16 @@ } ], "options-plugin/default-options": "error" - } + }, + "overrides": [ + { + "files": ["files/nested/**"], + "rules": { + "options-plugin/options": [ + "error", + {"somethingElse": true} + ] + } + } + ] } diff --git a/apps/oxlint/test/fixtures/options/files/nested/index.js b/apps/oxlint/test/fixtures/options/files/nested/index.js new file mode 100644 index 0000000000000..2756c24c45775 --- /dev/null +++ b/apps/oxlint/test/fixtures/options/files/nested/index.js @@ -0,0 +1 @@ +let x; diff --git a/apps/oxlint/test/fixtures/options/output.snap.md b/apps/oxlint/test/fixtures/options/output.snap.md index c47ffc3bd89ec..7a9446008551d 100644 --- a/apps/oxlint/test/fixtures/options/output.snap.md +++ b/apps/oxlint/test/fixtures/options/output.snap.md @@ -62,8 +62,59 @@ : ^ `---- -Found 0 warnings and 3 errors. -Finished in Xms on 1 file using X threads. + x options-plugin(default-options): + | options: [ + | "string", + | 123, + | true, + | { + | "toBe": false, + | "notToBe": true + | }, + | { + | "deep": [ + | { + | "deeper": { + | "evenDeeper": [ + | { + | "soDeep": { + | "soSoDeep": true + | } + | } + | ] + | } + | } + | ] + | } + | ] + | isDeepFrozen: true + ,-[files/nested/index.js:1:1] + 1 | let x; + : ^ + `---- + + x options-plugin(no-options): + | options: [] + | isDeepFrozen: true + ,-[files/nested/index.js:1:1] + 1 | let x; + : ^ + `---- + + x options-plugin(options): + | options: [ + | { + | "somethingElse": true + | } + | ] + | isDeepFrozen: true + ,-[files/nested/index.js:1:1] + 1 | let x; + : ^ + `---- + +Found 0 warnings and 6 errors. +Finished in Xms on 2 files using X threads. ``` # stderr