Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@textlint/kernel

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@textlint/kernel - npm Package Compare versions

Comparing version 1.0.0-beta.0 to 1.0.0

10

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="1.0.0"></a>
# [1.0.0](https://github.com/textlint/textlint/compare/@textlint/kernel@1.0.0-beta.0...@textlint/kernel@1.0.0) (2017-10-28)
**Note:** Version bump only for package @textlint/kernel
<a name="0.2.1"></a>

@@ -7,0 +15,0 @@ ## [0.2.1](https://github.com/textlint/textlint/compare/@textlint/kernel@0.2.0...@textlint/kernel@0.2.1) (2017-05-21)

4

lib/fixer/fixer-processor.d.ts
import SourceCode from "../core/source-code";
import { TextLintConfig, TextLintFixResult, TextlintKernelFilterRule, TextlintKernelProcessor, TextlintKernelRule } from "../textlint-kernel-interface";
import { TextLintFixResult, TextlintKernelConstructorOptions, TextlintKernelFilterRule, TextlintKernelProcessor, TextlintKernelRule } from "../textlint-kernel-interface";
import MessageProcessManager from "../messages/MessageProcessManager";
export interface FixerProcessorProcessArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
configBaseDir?: string;

@@ -7,0 +7,0 @@ rules?: TextlintKernelRule[];

@@ -1,6 +0,6 @@

import { TextLintConfig, TextlintKernelFilterRule, TextlintKernelProcessor, TextlintKernelRule } from "../textlint-kernel-interface";
import { TextlintKernelConstructorOptions, TextlintKernelFilterRule, TextlintKernelProcessor, TextlintKernelRule } from "../textlint-kernel-interface";
import MessageProcessManager from "../messages/MessageProcessManager";
import SourceCode from "../core/source-code";
export interface LinterProcessorArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
configBaseDir?: string;

@@ -7,0 +7,0 @@ rules?: TextlintKernelRule[];

@@ -1,2 +0,2 @@

import { TextLintConfig, TextLintMessage } from "../textlint-kernel-interface";
import { TextlintKernelConstructorOptions, TextLintMessage } from "../textlint-kernel-interface";
/**

@@ -19,2 +19,2 @@ * Filter messages by their severity.

*/
export default function createSeverityFilter(config: TextLintConfig): typeof filterWarningMessages;
export default function createSeverityFilter(config: TextlintKernelConstructorOptions): typeof filterWarningMessages;
import CoreTask from "./textlint-core-task";
import { TextLintConfig, TextlintKernelFilterRule, TextlintKernelRule } from "../textlint-kernel-interface";
import { TextlintKernelConstructorOptions, TextlintKernelFilterRule, TextlintKernelRule } from "../textlint-kernel-interface";
import SourceCode from "../core/source-code";
export interface TextLintCoreTaskArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
fixerRule: TextlintKernelRule;

@@ -12,3 +12,3 @@ filterRules: TextlintKernelFilterRule[];

export default class TextLintCoreTask extends CoreTask {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
fixerRule: TextlintKernelRule;

@@ -15,0 +15,0 @@ filterRules: TextlintKernelFilterRule[];

import CoreTask from "./textlint-core-task";
import { TextLintConfig, TextlintKernelFilterRule, TextlintKernelRule } from "../textlint-kernel-interface";
import { TextlintKernelConstructorOptions, TextlintKernelFilterRule, TextlintKernelRule } from "../textlint-kernel-interface";
import SourceCode from "../core/source-code";
export interface TextLintCoreTaskArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
rules: TextlintKernelRule[];

@@ -12,3 +12,3 @@ filterRules: TextlintKernelFilterRule[];

export default class TextLintCoreTask extends CoreTask {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
rules: TextlintKernelRule[];

@@ -15,0 +15,0 @@ filterRules: TextlintKernelFilterRule[];

@@ -11,2 +11,8 @@ import { ASTNodeTypes } from "@textlint/ast-node-types";

}
export interface TextlintKernelConstructorOptions {
/**
* Suppress messages of severity:warning and severity:info
*/
quiet?: boolean;
}
export interface TextLintConfig {

@@ -13,0 +19,0 @@ rulePaths?: string[];

@@ -1,3 +0,4 @@

import { TextLintConfig, TextLintFixResult, TextlintKernelOptions, TextlintKernelProcessor } from "./textlint-kernel-interface";
import { TextLintFixResult, TextlintKernelConstructorOptions, TextlintKernelOptions, TextlintKernelProcessor, TextLintResult } from "./textlint-kernel-interface";
/**
* TextlintKernel is core logic written by pure JavaScript.
*

@@ -14,3 +15,3 @@ * Pass

export declare class TextlintKernel {
config: TextLintConfig;
private config;
private messageProcessManager;

@@ -20,3 +21,3 @@ /**

*/
constructor(config?: TextLintConfig);
constructor(config?: TextlintKernelConstructorOptions);
/**

@@ -29,6 +30,3 @@ * lint text by registered rules.

*/
lintText(text: string, options: TextlintKernelOptions): Promise<{
messages: any[];
filePath: string;
}>;
lintText(text: string, options: TextlintKernelOptions): Promise<TextLintResult>;
/**

@@ -40,3 +38,3 @@ * fix texts and return fix result object

*/
fixText(text: string, options: TextlintKernelOptions): Promise<TextLintFixResult>;
fixText(text: string, options: TextlintKernelOptions): Promise<TextLintResult>;
/**

@@ -43,0 +41,0 @@ * process text in parallel for Rules and return {Promise.<TextLintResult>}

@@ -64,2 +64,3 @@ // MIT © 2017 azu

/**
* TextlintKernel is core logic written by pure JavaScript.
*

@@ -66,0 +67,0 @@ * Pass

@@ -13,3 +13,3 @@ {

"name": "@textlint/kernel",
"version": "1.0.0-beta.0",
"version": "1.0.0",
"description": "textlint kernel is core logic by pure JavaScript.",

@@ -58,3 +58,3 @@ "main": "lib/textlint-kernel.js",

"shelljs": "^0.7.7",
"textlint-plugin-markdown": "^3.0.0-beta.0",
"textlint-plugin-markdown": "^3.0.0",
"ts-node": "^3.3.0",

@@ -61,0 +61,0 @@ "typescript": "^2.5.2",

@@ -11,4 +11,4 @@ // LICENSE : MIT

import {
TextLintConfig,
TextLintFixResult,
TextlintKernelConstructorOptions,
TextlintKernelFilterRule,

@@ -22,3 +22,3 @@ TextlintKernelProcessor,

export interface FixerProcessorProcessArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
configBaseDir?: string;

@@ -25,0 +25,0 @@ rules?: TextlintKernelRule[];

@@ -7,3 +7,3 @@ // LICENSE : MIT

import {
TextLintConfig,
TextlintKernelConstructorOptions,
TextlintKernelFilterRule,

@@ -17,3 +17,3 @@ TextlintKernelProcessor,

export interface LinterProcessorArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
configBaseDir?: string;

@@ -20,0 +20,0 @@ rules?: TextlintKernelRule[];

// LICENSE : MIT
"use strict";
import SeverityLevel from "../shared/type/SeverityLevel";
import { TextLintConfig, TextLintMessage } from "../textlint-kernel-interface";
import { TextlintKernelConstructorOptions, TextLintMessage } from "../textlint-kernel-interface";

@@ -31,3 +31,3 @@ /**

*/
export default function createSeverityFilter(config: TextLintConfig) {
export default function createSeverityFilter(config: TextlintKernelConstructorOptions) {
if (config.quiet) {

@@ -34,0 +34,0 @@ return filterWarningMessages;

// LICENSE : MIT
"use strict";
import CoreTask from "./textlint-core-task";
import { getFixer, getFilter } from "../core/rule-creator-helper";
import { getFilter, getFixer } from "../core/rule-creator-helper";
import RuleContext from "../core/rule-context";
import FilterRuleContext from "../core/filter-rule-context";
import { TextLintConfig, TextlintKernelFilterRule, TextlintKernelRule } from "../textlint-kernel-interface";
import {
TextlintKernelConstructorOptions,
TextlintKernelFilterRule,
TextlintKernelRule
} from "../textlint-kernel-interface";
import SourceCode from "../core/source-code";

@@ -13,3 +17,3 @@

export interface TextLintCoreTaskArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
fixerRule: TextlintKernelRule;

@@ -22,3 +26,3 @@ filterRules: TextlintKernelFilterRule[];

export default class TextLintCoreTask extends CoreTask {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
fixerRule: TextlintKernelRule;

@@ -25,0 +29,0 @@ filterRules: TextlintKernelFilterRule[];

// LICENSE : MIT
"use strict";
import CoreTask from "./textlint-core-task";
import { getLinter, getFilter } from "../core/rule-creator-helper";
import { getFilter, getLinter } from "../core/rule-creator-helper";
import RuleContext from "../core/rule-context";
import FilterRuleContext from "../core/filter-rule-context";
import { TextLintConfig, TextlintKernelFilterRule, TextlintKernelRule } from "../textlint-kernel-interface";
import {
TextlintKernelConstructorOptions,
TextlintKernelFilterRule,
TextlintKernelRule
} from "../textlint-kernel-interface";
import SourceCode from "../core/source-code";

@@ -13,3 +17,3 @@

export interface TextLintCoreTaskArgs {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
rules: TextlintKernelRule[];

@@ -22,3 +26,3 @@ filterRules: TextlintKernelFilterRule[];

export default class TextLintCoreTask extends CoreTask {
config: TextLintConfig;
config: TextlintKernelConstructorOptions;
rules: TextlintKernelRule[];

@@ -25,0 +29,0 @@ filterRules: TextlintKernelFilterRule[];

@@ -16,2 +16,9 @@ // rule config

export interface TextlintKernelConstructorOptions {
/**
* Suppress messages of severity:warning and severity:info
*/
quiet?: boolean;
}
// config

@@ -18,0 +25,0 @@ export interface TextLintConfig {

@@ -16,8 +16,9 @@ // MIT © 2017 azu

import {
TextLintConfig,
TextLintFixResult,
TextlintKernelConstructorOptions,
TextlintKernelOptions,
TextlintKernelPlugin,
TextlintKernelProcessor,
TextlintKernelProcessorConstructor
TextlintKernelProcessorConstructor,
TextLintResult
} from "./textlint-kernel-interface";

@@ -72,2 +73,3 @@

/**
* TextlintKernel is core logic written by pure JavaScript.
*

@@ -84,3 +86,3 @@ * Pass

export class TextlintKernel {
config: TextLintConfig;
private config: TextlintKernelConstructorOptions;
private messageProcessManager: MessageProcessManager;

@@ -91,3 +93,3 @@

*/
constructor(config: TextLintConfig = {}) {
constructor(config: TextlintKernelConstructorOptions = {}) {
// this.config often is undefined.

@@ -113,3 +115,3 @@ this.config = config;

*/
lintText(text: string, options: TextlintKernelOptions) {
lintText(text: string, options: TextlintKernelOptions): Promise<TextLintResult> {
return Promise.resolve().then(() => {

@@ -139,3 +141,3 @@ const ext = options.ext;

*/
fixText(text: string, options: TextlintKernelOptions) {
fixText(text: string, options: TextlintKernelOptions): Promise<TextLintResult> {
return Promise.resolve().then(() => {

@@ -142,0 +144,0 @@ const ext = options.ext;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc