Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing additionalProperties to schema #1589

Merged
merged 2 commits into from Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions rules/better-regex.js
Expand Up @@ -101,6 +101,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
sortCharacterClasses: {
type: 'boolean',
Expand Down
1 change: 1 addition & 0 deletions rules/catch-error-name.js
Expand Up @@ -100,6 +100,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
name: {
type: 'string',
Expand Down
1 change: 1 addition & 0 deletions rules/consistent-function-scoping.js
Expand Up @@ -196,6 +196,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
checkArrowFunctions: {
type: 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion rules/expiring-todo-comments.js
Expand Up @@ -510,6 +510,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
terms: {
type: 'array',
Expand All @@ -530,7 +531,6 @@ const schema = [
default: false,
},
},
additionalProperties: false,
},
];

Expand Down
1 change: 1 addition & 0 deletions rules/explicit-length-check.js
Expand Up @@ -185,6 +185,7 @@ function create(context) {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
'non-zero': {
enum: [...nonZeroStyles.keys()],
Expand Down
2 changes: 1 addition & 1 deletion rules/import-index.js
Expand Up @@ -37,13 +37,13 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
ignoreImports: {
type: 'boolean',
default: false,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/import-style.js
Expand Up @@ -313,6 +313,7 @@ const schema = {
items: [
{
type: 'object',
additionalProperties: false,
properties: {
checkImport: {
type: 'boolean',
Expand All @@ -333,7 +334,6 @@ const schema = {
$ref: '#/definitions/moduleStyles',
},
},
additionalProperties: false,
},
],
definitions: {
Expand Down
2 changes: 1 addition & 1 deletion rules/no-array-push-push.js
Expand Up @@ -110,13 +110,13 @@ function create(context) {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
ignore: {
type: 'array',
uniqueItems: true,
},
},
additionalProperties: false,
},
];

Expand Down
1 change: 1 addition & 0 deletions rules/no-array-reduce.js
Expand Up @@ -38,6 +38,7 @@ const selector = matches([
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
allowSimpleOperations: {
type: 'boolean',
Expand Down
2 changes: 1 addition & 1 deletion rules/no-keyword-prefix.js
Expand Up @@ -167,6 +167,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
disallowedPrefixes: {
type: 'array',
Expand All @@ -185,7 +186,6 @@ const schema = [
type: 'boolean',
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/no-null.js
Expand Up @@ -93,13 +93,13 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
checkStrictEquality: {
type: 'boolean',
default: false,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/no-useless-undefined.js
Expand Up @@ -190,12 +190,12 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
checkArguments: {
type: 'boolean',
},
},
additionalProperties: false,
},
];

Expand Down
4 changes: 2 additions & 2 deletions rules/numeric-separators-style.js
Expand Up @@ -133,6 +133,7 @@ const create = context => {

const formatOptionsSchema = ({minimumDigits, groupLength}) => ({
type: 'object',
additionalProperties: false,
properties: {
onlyIfContainsSeparator: {
type: 'boolean',
Expand All @@ -148,11 +149,11 @@ const formatOptionsSchema = ({minimumDigits, groupLength}) => ({
default: groupLength,
},
},
additionalProperties: false,
});

const schema = [{
type: 'object',
additionalProperties: false,
properties: {
...Object.fromEntries(
Object.entries(defaultOptions).map(([type, options]) => [type, formatOptionsSchema(options)]),
Expand All @@ -162,7 +163,6 @@ const schema = [{
default: false,
},
},
additionalProperties: false,
}];

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-add-event-listener.js
Expand Up @@ -157,6 +157,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
excludedPackages: {
type: 'array',
Expand All @@ -166,7 +167,6 @@ const schema = [
uniqueItems: true,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-array-flat.js
Expand Up @@ -234,13 +234,13 @@ function create(context) {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
functions: {
type: 'array',
uniqueItems: true,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-at.js
Expand Up @@ -284,6 +284,7 @@ function create(context) {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
getLastElementFunctions: {
type: 'array',
Expand All @@ -294,7 +295,6 @@ const schema = [
default: false,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-node-protocol.js
Expand Up @@ -50,13 +50,13 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
checkRequire: {
type: 'boolean',
default: false,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-number-properties.js
Expand Up @@ -127,13 +127,13 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
checkInfinity: {
type: 'boolean',
default: true,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-object-from-entries.js
Expand Up @@ -249,13 +249,13 @@ function create(context) {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
functions: {
type: 'array',
uniqueItems: true,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-object-has-own.js
Expand Up @@ -81,13 +81,13 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
functions: {
type: 'array',
uniqueItems: true,
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prefer-switch.js
Expand Up @@ -302,6 +302,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
minimumCases: {
type: 'integer',
Expand All @@ -317,7 +318,6 @@ const schema = [
default: 'no-default-comment',
},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/prevent-abbreviations.js
Expand Up @@ -534,6 +534,7 @@ const schema = {
items: [
{
type: 'object',
additionalProperties: false,
properties: {
checkProperties: {
type: 'boolean',
Expand Down Expand Up @@ -578,7 +579,6 @@ const schema = {
uniqueItems: true,
},
},
additionalProperties: false,
},
],
definitions: {
Expand Down
2 changes: 1 addition & 1 deletion rules/string-content.js
Expand Up @@ -136,6 +136,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
patterns: {
type: 'object',
Expand Down Expand Up @@ -167,7 +168,6 @@ const schema = [
],
}},
},
additionalProperties: false,
},
];

Expand Down
2 changes: 1 addition & 1 deletion rules/template-indent.js
Expand Up @@ -104,6 +104,7 @@ const create = context => {
const schema = [
{
type: 'object',
additionalProperties: false,
properties: {
indent: {
oneOf: [
Expand Down Expand Up @@ -146,7 +147,6 @@ const schema = [
},
},
},
additionalProperties: false,
},
];

Expand Down