@markuplint/create-rule-helper
Advanced tools
Comparing version 2.0.0-rc.6 to 2.0.0
export declare class CreateRuleHelperError extends Error { | ||
name: string; | ||
name: string; | ||
} |
import type { CreateRuleCreatorParams, CreateRuleHelperResult } from './types'; | ||
export declare function craeteRulePackage({ name, lang, needTest, }: CreateRuleCreatorParams): Promise<CreateRuleHelperResult>; | ||
export declare function craeteRulePackage({ | ||
name, | ||
lang, | ||
needTest, | ||
}: CreateRuleCreatorParams): Promise<CreateRuleHelperResult>; |
import type { CreateRuleCreatorParams, CreateRuleHelperResult } from './types'; | ||
export declare function craeteRuleToCore({ name, lang, needTest, }: CreateRuleCreatorParams): Promise<CreateRuleHelperResult>; | ||
export declare function craeteRuleToCore({ | ||
name, | ||
lang, | ||
needTest, | ||
}: CreateRuleCreatorParams): Promise<CreateRuleHelperResult>; | ||
export declare function getRulesDir(): Promise<string>; |
import type { CreateRuleCreatorParams, CreateRuleHelperResult } from './types'; | ||
export declare function craeteRuleToProject({ name, lang, needTest, }: CreateRuleCreatorParams): Promise<CreateRuleHelperResult>; | ||
export declare function craeteRuleToProject({ | ||
name, | ||
lang, | ||
needTest, | ||
}: CreateRuleCreatorParams): Promise<CreateRuleHelperResult>; |
import type { CreateRuleCreatorParams, CreateRuleHelperResult } from './types'; | ||
export declare function installScaffold(scaffoldDir: string, dest: string, sourceDir: string, params: CreateRuleCreatorParams & { | ||
packageJson?: boolean; | ||
schemaJson?: boolean; | ||
}): Promise<CreateRuleHelperResult>; | ||
export declare function installScaffold( | ||
scaffoldDir: string, | ||
dest: string, | ||
sourceDir: string, | ||
params: CreateRuleCreatorParams & { | ||
packageJson?: boolean; | ||
schemaJson?: boolean; | ||
}, | ||
): Promise<CreateRuleHelperResult>; |
@@ -1,3 +0,8 @@ | ||
export declare function transfer(filePath: string, destDir: string, replacer: Record<string, string>, options?: { | ||
transpile: boolean; | ||
}): Promise<string>; | ||
export declare function transfer( | ||
filePath: string, | ||
destDir: string, | ||
replacer: Record<string, string>, | ||
options?: { | ||
transpile: boolean; | ||
}, | ||
): Promise<string>; |
export declare type CreateRuleHelperParams = CreateRuleCreatorParams & { | ||
purpose: CreateRulePurpose; | ||
purpose: CreateRulePurpose; | ||
}; | ||
export declare type CreateRuleCreatorParams = { | ||
name: string; | ||
lang: CreateRuleLanguage; | ||
needTest: boolean; | ||
name: string; | ||
lang: CreateRuleLanguage; | ||
needTest: boolean; | ||
}; | ||
export declare type CreateRuleHelperResult = CreateRuleCreatorParams & { | ||
readme: string; | ||
main: string; | ||
test: string | null; | ||
packageJson: string | null; | ||
schemaJson: string | null; | ||
tsConfig: string | null; | ||
dependencies: string[]; | ||
devDependencies: string[]; | ||
readme: string; | ||
main: string; | ||
test: string | null; | ||
packageJson: string | null; | ||
schemaJson: string | null; | ||
tsConfig: string | null; | ||
dependencies: string[]; | ||
devDependencies: string[]; | ||
}; | ||
export declare type CreateRuleLanguage = 'JAVASCRIPT' | 'TYPESCRIPT'; | ||
export declare type CreateRulePurpose = 'ADD_TO_PROJECT' | 'PUBLISH_AS_PACKAGE' | 'CONTRIBUTE_TO_CORE'; |
{ | ||
"name": "@markuplint/create-rule-helper", | ||
"version": "2.0.0-rc.6", | ||
"version": "2.0.0", | ||
"description": "Create rule helper", | ||
@@ -20,8 +20,8 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/ml-core": "2.0.0-rc.6", | ||
"@markuplint/ml-core": "2.0.0", | ||
"glob": "^7.2.0", | ||
"mustache": "^4.2.0", | ||
"prettier": "^2.4.1", | ||
"prettier": "^2.5.1", | ||
"tslib": "^2.3.1", | ||
"typescript": "^4.4.4" | ||
"typescript": "^4.5.5" | ||
}, | ||
@@ -32,3 +32,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "7c93367a86f935f6b94780b1fa14f3293f900b87" | ||
"gitHead": "de81fc514acdf472f87184e3499e9364258f9b66" | ||
} |
@@ -1,6 +0,4 @@ | ||
# @markuplint/rule-textlint | ||
# @markuplint/create-rule-helper | ||
The rule [`textlint`](https://github.com/textlint/textlint) for HTML, Vue and so on markup languages. | ||
[](https://www.npmjs.com/package/@markuplint/rule-textlint) | ||
[](https://www.npmjs.com/package/@markuplint/create-rule-helper) | ||
[](https://travis-ci.org/markuplint/markuplint) | ||
@@ -12,77 +10,5 @@ [](https://coveralls.io/github/markuplint/markuplint?branch=main) | ||
```sh | ||
$ npm install @markuplint/rule-textlint | ||
$ npm install @markuplint/create-rule-helper | ||
$ yarn add @markuplint/rule-textlint | ||
$ yarn add @markuplint/create-rule-helper | ||
``` | ||
## Usage | ||
### Example | ||
```sh | ||
$ yarn add -D textlint-rule-prh | ||
``` | ||
#### Load `.textlintrc.*` config automatically | ||
```json | ||
// `.markuplintrc` | ||
{ | ||
"rules": { | ||
"textlint": true | ||
} | ||
} | ||
``` | ||
```json | ||
// `.textlintrc` | ||
{ | ||
// `html` plugin will be used automatically by `markuplint` | ||
// but make sure to enable it manually | ||
// if you are using `textlint` as cli at the same time | ||
// "plugins": ["html"], | ||
"rules": { | ||
"prh": { | ||
"rulePaths": ["../prh.yml"] | ||
} | ||
} | ||
} | ||
``` | ||
#### Use independent textlint config | ||
```js | ||
// `markuplint.config.js` | ||
const path = require('path'); | ||
module.exports = { | ||
rules: { | ||
textlint: { | ||
option: { | ||
rules: [ | ||
{ | ||
ruleId: 'prh', | ||
rule: require('textlint-rule-prh'), | ||
options: { | ||
rulePaths: [path.resolve(__dirname, '../', 'prh.yml')], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}; | ||
``` | ||
## Contributing | ||
``` | ||
$ git clone git@github.com:markuplint/markuplint.git -b main | ||
$ yarn | ||
$ yarn build | ||
$ yarn test | ||
``` | ||
--- | ||
Copyright © 2021 markuplint. Under the MIT License. |
@@ -27,4 +27,4 @@ --- | ||
- Type: `string` | ||
- Deafult Value: `"__DEFAULT_MAIN_VALUE__"` | ||
- Type: `string` | ||
- Deafult Value: `"__DEFAULT_MAIN_VALUE__"` | ||
@@ -31,0 +31,0 @@ ### Options |
@@ -21,4 +21,4 @@ # The `{{name}}` rule | ||
- Type: `string` | ||
- Deafult Value: `"__DEFAULT_MAIN_VALUE__"` | ||
- Type: `string` | ||
- Deafult Value: `"__DEFAULT_MAIN_VALUE__"` | ||
@@ -25,0 +25,0 @@ ### Options |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
610
1
65475
14
+ Added@markuplint/i18n@2.0.0(transitive)
+ Added@markuplint/ml-ast@2.0.0(transitive)
+ Added@markuplint/ml-config@2.0.0(transitive)
+ Added@markuplint/ml-core@2.0.0(transitive)
+ Added@markuplint/ml-spec@2.0.0(transitive)
+ Added@markuplint/parser-utils@2.0.0(transitive)
+ Added@markuplint/types@2.0.0(transitive)
- Removed@markuplint/i18n@2.0.0-rc.5(transitive)
- Removed@markuplint/ml-ast@2.0.0-rc.6(transitive)
- Removed@markuplint/ml-config@2.0.0-rc.5(transitive)
- Removed@markuplint/ml-core@2.0.0-rc.6(transitive)
- Removed@markuplint/ml-spec@2.0.0-rc.6(transitive)
- Removed@markuplint/parser-utils@2.0.0-rc.6(transitive)
- Removed@markuplint/types@2.0.0-rc.6(transitive)
Updated@markuplint/ml-core@2.0.0
Updatedprettier@^2.5.1
Updatedtypescript@^4.5.5