Skip to content

Commit

Permalink
feat: formatting issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan Tongshuai committed Sep 23, 2024
1 parent 8881300 commit d972a01
Show file tree
Hide file tree
Showing 4 changed files with 2,587 additions and 5,224 deletions.
68 changes: 17 additions & 51 deletions lib/options/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,56 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"framework": {
"type": "string",
"enum": [
"vue",
"react"
]
"framework":{
"type":"string",
"enum": ["react","vue"]
},
"mode": {
"type": "string",
"enum": [
"jsx-text-only",
"jsx-only",
"all",
"vue-template-only"
]
"enum": ["jsx-text-only", "jsx-only", "all","vue-template-only"]
},
"jsx-components": {
"type": "object",
"properties": {
"include": {
"type": "array"
},
"exclude": {
"type": "array"
}
"include": { "type": "array" },
"exclude": { "type": "array" }
}
},
"jsx-attributes": {
"type": "object",
"properties": {
"include": {
"type": "array"
},
"exclude": {
"type": "array"
}
"include": { "type": "array" },
"exclude": { "type": "array" }
}
},
"words": {
"type": "object",
"properties": {
"exclude": {
"type": "array"
}
"exclude": { "type": "array" }
}
},
"callees": {
"type": "object",
"properties": {
"include": {
"type": "array"
},
"exclude": {
"type": "array"
}
"include": { "type": "array" },
"exclude": { "type": "array" }
}
},
"object-properties": {
"type": "object",
"properties": {
"include": {
"type": "array"
},
"exclude": {
"type": "array"
}
"include": { "type": "array" },
"exclude": { "type": "array" }
}
},
"class-properties": {
"type": "object",
"properties": {
"include": {
"type": "array"
},
"exclude": {
"type": "array"
}
"include": { "type": "array" },
"exclude": { "type": "array" }
}
},
"message": {
"type": "string"
},
"should-validate-template": {
"type": "boolean"
}
"message": { "type": "string" },
"should-validate-template": { "type": "boolean" }
}
}
3 changes: 2 additions & 1 deletion lib/rules/no-literal-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ module.exports = {
} = options;
const onlyValidateJSX = ['jsx-only', 'jsx-text-only'].includes(mode);

const onlyValidateVueTemplate = framework === 'vue' && mode !== 'all';
const onlyValidateVueTemplate =
framework === 'vue' && mode === 'vue-template-only';

//----------------------------------------------------------------------
// Helpers
Expand Down
Loading

0 comments on commit d972a01

Please sign in to comment.