Yuki Takei 3 лет назад
Родитель
Сommit
6c3bfcba57

+ 0 - 2
apps/app/package.json

@@ -61,7 +61,6 @@
     "@elastic/elasticsearch7": "npm:@elastic/elasticsearch@^7.17.0",
     "@godaddy/terminus": "^4.9.0",
     "@google-cloud/storage": "^5.8.5",
-    "@growi/codemirror-textlint": "^6.1.0-RC.0",
     "@growi/core": "^6.1.0-RC.0",
     "@growi/hackmd": "^6.1.0-RC.0",
     "@growi/preset-themes": "^6.1.0-RC.0",
@@ -224,7 +223,6 @@
     "i18next-hmr": "^1.11.0",
     "jquery-slimscroll": "^1.3.8",
     "jquery.cookie": "~1.4.1",
-    "jshint": "^2.13.0",
     "load-css-file": "^1.0.0",
     "material-icons": "^1.11.3",
     "morgan": "^1.10.0",

+ 0 - 3
apps/app/public/static/dict/base.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0803327762e1c93ca731e4319ab8343340f2806bb84941207782cde9d2d5a8eb
-size 3956825

+ 0 - 3
apps/app/public/static/dict/cc.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:02b7631be0d4de3a1a75cd9f9cc51536e4f94c9e6b389b813e06ba0f6e7de765
-size 1692067

+ 0 - 3
apps/app/public/static/dict/check.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:193ae0035fff6fe812b58d9ee730e7a7d7ee601d918481ce51075c58114f6cc9
-size 3111633

+ 0 - 3
apps/app/public/static/dict/tid.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d43d831cb6fb0f0a411739cd287a6d5e998e121a8daca614df14a81a0dcac586
-size 1605820

+ 0 - 3
apps/app/public/static/dict/tid_map.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:33efd5ffd87a70f669add093fa39dee44341d58f940844ef107c8fd98bb795b2
-size 1485576

+ 0 - 3
apps/app/public/static/dict/tid_pos.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:60dbfc99a6ab993f30c5dab648bec6ad7f9aaefa5c14e1843837d95e509f8895
-size 5916009

+ 0 - 3
apps/app/public/static/dict/unk.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:f7f991cdeb9bfd3e9c0e4577cc50ee0815a11c508cccd444a9d3ab3c81521100
-size 10512

+ 0 - 3
apps/app/public/static/dict/unk_char.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:9a8e86fd9aff32d323fbb59f5a7006f05927a11f8173c90712cc56293aeb3225
-size 306

+ 0 - 3
apps/app/public/static/dict/unk_compat.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:50f60aa29bc2e86c2903ab8c825bb6fa604d2b294d96941c1d3924259791899d
-size 338

+ 0 - 3
apps/app/public/static/dict/unk_invoke.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6b210889548457c3006913afd12c8b525562255f2709e404604be9614a25e94c
-size 1140

+ 0 - 3
apps/app/public/static/dict/unk_map.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6df12460e5477230bb6fd9641def918b699fc0a8868016b6c9f794488630509b
-size 1190

+ 0 - 3
apps/app/public/static/dict/unk_pos.dat.gz

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5b183a29f281acc7e0542beca47b83f7985047c0a2d27e78a66f32276be5ad11
-size 10540

+ 0 - 2
packages/codemirror-textlint/.eslintignore

@@ -1,2 +0,0 @@
-/dist/**
-/types/**

+ 0 - 1
packages/codemirror-textlint/.gitignore

@@ -1 +0,0 @@
-/dist

+ 0 - 51
packages/codemirror-textlint/package.json

@@ -1,51 +0,0 @@
-{
-  "name": "@growi/codemirror-textlint",
-  "version": "6.1.0-RC.0",
-  "license": "MIT",
-  "main": "dist/index.js",
-  "scripts": {
-    "build": "yarn tsc && tsc-alias -p tsconfig.build.json",
-    "clean": "npx -y shx rm -rf dist",
-    "tsc": "tsc -p tsconfig.build.json",
-    "tsc:w": "yarn tsc -w",
-    "lint": "yarn eslint src --ext .ts",
-    "lint:fix": "yarn eslint src --ext .ts --fix"
-  },
-  "dependencies": {},
-  "devDependencies": {
-    "@textlint-rule/textlint-rule-no-unmatched-pair": "^1.0.8",
-    "@textlint/kernel": "^12.0.2",
-    "@types/codemirror": "^5.60.2",
-    "eslint-plugin-regex": "^1.8.0",
-    "textlint-message-to-codemirror": "^1.0.0",
-    "textlint-plugin-markdown": "^4.0.6",
-    "textlint-rule-common-misspellings": "^1.0.1",
-    "textlint-rule-date-weekday-mismatch": "^1.0.6",
-    "textlint-rule-ja-hiragana-keishikimeishi": "^1.1.0",
-    "textlint-rule-ja-no-abusage": "^3.0.0",
-    "textlint-rule-ja-no-inappropriate-words": "^2.0.0",
-    "textlint-rule-ja-no-mixed-period": "^2.1.1",
-    "textlint-rule-ja-no-redundant-expression": "^4.0.0",
-    "textlint-rule-ja-unnatural-alphabet": "^2.0.1",
-    "textlint-rule-max-comma": "^2.0.2",
-    "textlint-rule-max-kanji-continuous-len": "^1.1.1",
-    "textlint-rule-max-ten": "^4.0.2",
-    "textlint-rule-no-double-negative-ja": "^2.0.0",
-    "textlint-rule-no-doubled-conjunction": "^2.0.2",
-    "textlint-rule-no-doubled-joshi": "^4.0.0",
-    "textlint-rule-no-dropping-the-ra": "^3.0.0",
-    "textlint-rule-no-hankaku-kana": "^1.0.2",
-    "textlint-rule-no-kangxi-radicals": "^0.2.0",
-    "textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet": "^1.0.1",
-    "textlint-rule-no-nfd": "^1.0.2",
-    "textlint-rule-no-surrogate-pair": "^1.0.1",
-    "textlint-rule-no-zero-width-spaces": "^1.0.1",
-    "textlint-rule-period-in-list-item": "^0.3.2",
-    "textlint-rule-prefer-tari-tari": "^1.0.3",
-    "textlint-rule-sentence-length": "^3.0.0",
-    "textlint-rule-use-si-units": "^1.0.2"
-  },
-  "peerDependencies": {
-    "codemirror": "^5.62.3"
-  }
-}

+ 0 - 151
packages/codemirror-textlint/src/index.ts

@@ -1,151 +0,0 @@
-import textlintRuleNoUnmatchedPair from '@textlint-rule/textlint-rule-no-unmatched-pair';
-import { TextlintKernel, TextlintKernelRule, TextlintRuleOptions } from '@textlint/kernel';
-import { AsyncLinter, Annotation } from 'codemirror/addon/lint/lint';
-import textlintToCodeMirror from 'textlint-message-to-codemirror';
-import textlintRuleCommonMisspellings from 'textlint-rule-common-misspellings';
-import textlintRuleDateWeekdayMismatch from 'textlint-rule-date-weekday-mismatch';
-// import textlintRuleEnCapitalization from 'textlint-rule-en-capitalization';  // omit because en-pos package is too big
-import textlintRuleJaHiraganaKeishikimeishi from 'textlint-rule-ja-hiragana-keishikimeishi';
-import textlintRuleJaNoAbusage from 'textlint-rule-ja-no-abusage';
-import textlintRuleJaNoInappropriateWords from 'textlint-rule-ja-no-inappropriate-words';
-import textlintRuleJaNoMixedPeriod from 'textlint-rule-ja-no-mixed-period';
-import textlintRuleJaNoRedundantExpression from 'textlint-rule-ja-no-redundant-expression';
-import textlintRuleJaUnnaturalAlphabet from 'textlint-rule-ja-unnatural-alphabet';
-import textlintRuleMaxComma from 'textlint-rule-max-comma';
-import textlintRuleMaxKanjiContinuousLen from 'textlint-rule-max-kanji-continuous-len';
-import textlintRuleMaxTen from 'textlint-rule-max-ten';
-import textlintRuleNoDoubleNegativeJa from 'textlint-rule-no-double-negative-ja';
-import textlintRuleNoDoubledConjunction from 'textlint-rule-no-doubled-conjunction';
-import textlintRuleNoDoubledJoshi from 'textlint-rule-no-doubled-joshi';
-import textlintRuleNoDroppingTheRa from 'textlint-rule-no-dropping-the-ra';
-import textlintRuleNoHankakuKana from 'textlint-rule-no-hankaku-kana';
-import textlintRuleNoKangxiRadicals from 'textlint-rule-no-kangxi-radicals';
-import textlintRuleNoMixedZenkakuAndHankakuAlphabet from 'textlint-rule-no-mixed-zenkaku-and-hankaku-alphabet';
-import textlintRuleNoNfd from 'textlint-rule-no-nfd';
-import textlintRuleNoSurrogatePair from 'textlint-rule-no-surrogate-pair';
-import textlintRuleNoZeroWidthSpaces from 'textlint-rule-no-zero-width-spaces';
-import textlintRulePeriodInListItem from 'textlint-rule-period-in-list-item';
-import textlintRulePreferTariTari from 'textlint-rule-prefer-tari-tari';
-import textlintRuleSentenceLength from 'textlint-rule-sentence-length';
-import textlintRuleUseSiUnits from 'textlint-rule-use-si-units';
-
-import { loggerFactory } from './utils/logger';
-
-type RulesConfigObj = {
-  name: string,
-  options?: unknown,
-  isEnabled?: boolean,
-}
-
-type RuleExtension = {
-  ext: string
-}
-
-const ruleModulesList = {
-  'no-unmatched-pair': textlintRuleNoUnmatchedPair,
-  'common-misspellings': textlintRuleCommonMisspellings,
-  'date-weekday-mismatch': textlintRuleDateWeekdayMismatch,
-  // 'en-capitalization': textlintRuleEnCapitalization, // omit because en-pos package is too big
-  'ja-hiragana-keishikimeishi': textlintRuleJaHiraganaKeishikimeishi,
-  'ja-no-abusage': textlintRuleJaNoAbusage,
-  'ja-no-inappropriate-words': textlintRuleJaNoInappropriateWords,
-  'ja-no-mixed-period': textlintRuleJaNoMixedPeriod,
-  'ja-no-redundant-expression': textlintRuleJaNoRedundantExpression,
-  'ja-unnatural-alphabet': textlintRuleJaUnnaturalAlphabet,
-  'max-comma': textlintRuleMaxComma,
-  'max-kanji-continuous-len': textlintRuleMaxKanjiContinuousLen,
-  'max-ten': textlintRuleMaxTen,
-  'no-double-negative-ja': textlintRuleNoDoubleNegativeJa,
-  'no-doubled-conjunction': textlintRuleNoDoubledConjunction,
-  'no-doubled-joshi': textlintRuleNoDoubledJoshi,
-  'no-dropping-the-ra': textlintRuleNoDroppingTheRa,
-  'no-hankaku-kana': textlintRuleNoHankakuKana,
-  'no-kangxi-radicals': textlintRuleNoKangxiRadicals,
-  'no-mixed-zenkaku-and-hankaku-alphabet': textlintRuleNoMixedZenkakuAndHankakuAlphabet,
-  'no-nfd': textlintRuleNoNfd,
-  'no-surrogate-pair': textlintRuleNoSurrogatePair,
-  'no-zero-width-spaces': textlintRuleNoZeroWidthSpaces,
-  'period-in-list-item': textlintRulePeriodInListItem,
-  'prefer-tari-tari': textlintRulePreferTariTari,
-  'sentence-length': textlintRuleSentenceLength,
-  'use-si-units': textlintRuleUseSiUnits,
-};
-
-const logger = loggerFactory('growi:codemirror:codemirror-textlint');
-const kernel = new TextlintKernel();
-const textlintOption: TextlintRuleOptions<RuleExtension> = {
-  ext: '.md',
-  plugins: [
-    {
-      pluginId: 'markdown',
-      plugin: require('textlint-plugin-markdown'),
-    },
-  ],
-};
-
-const createSetupRules = (rules, ruleOptions): TextlintKernelRule[] => (
-  Object.keys(rules).map(ruleName => (
-    {
-      ruleId: ruleName,
-      rule: rules[ruleName],
-      options: ruleOptions[ruleName],
-    }
-  ))
-);
-
-
-export const createValidator = (rulesConfigArray: RulesConfigObj[] | null): AsyncLinter<RulesConfigObj[] | null> => {
-  if (rulesConfigArray != null) {
-    const filteredConfigArray = rulesConfigArray
-      .filter((rule) => {
-        if (ruleModulesList[rule.name] == null) {
-          logger.error(`Textlint rule ${rule.name} is not installed`);
-        }
-        return (ruleModulesList[rule.name] != null && rule.isEnabled !== false);
-      });
-
-    const rules = filteredConfigArray
-      .reduce((rules, rule) => {
-        rules[rule.name] = ruleModulesList[rule.name];
-        return rules;
-      }, {});
-
-    const rulesOption = filteredConfigArray
-      .reduce((rules, rule) => {
-        rules[rule.name] = rule.options || {};
-        return rules;
-      }, {});
-
-    Object.assign(
-      textlintOption,
-      { rules: createSetupRules(rules, rulesOption) },
-    );
-  }
-
-  const defaultSetupRules: TextlintKernelRule[] = Object.entries(ruleModulesList)
-    .map(ruleName => ({
-      ruleId: ruleName[0],
-      rule: ruleName[1],
-    }));
-
-  if (rulesConfigArray == null) {
-    Object.assign(
-      textlintOption,
-      { rules: defaultSetupRules },
-    );
-  }
-
-  return (text, callback) => {
-    if (!text) {
-      callback([]);
-      return;
-    }
-    kernel
-      .lintText(text, textlintOption)
-      .then((result) => {
-        const lintMessages = result.messages;
-        const lintErrors: Annotation[] = lintMessages.map(textlintToCodeMirror);
-        callback(lintErrors);
-      });
-  };
-};

+ 0 - 9
packages/codemirror-textlint/src/utils/logger/index.ts

@@ -1,9 +0,0 @@
-import Logger from 'bunyan';
-import { createLogger } from 'universal-bunyan';
-
-export const loggerFactory = function(name: string): Logger {
-  return createLogger({
-    name,
-    config: { default: 'info' },
-  });
-};

+ 0 - 9
packages/codemirror-textlint/tsconfig.base.json

@@ -1,9 +0,0 @@
-{
-  "$schema": "http://json.schemastore.org/tsconfig",
-  "extends": "../../tsconfig.base.json",
-  "compilerOptions": {
-  },
-  "include": [
-    "src"
-  ]
-}

+ 0 - 17
packages/codemirror-textlint/tsconfig.build.json

@@ -1,17 +0,0 @@
-{
-  "$schema": "http://json.schemastore.org/tsconfig",
-  "extends": "./tsconfig.base.json",
-  "compilerOptions": {
-    "rootDir": "./src",
-    "outDir": "dist",
-    "declaration": true,
-    "noResolve": false,
-    "preserveConstEnums": true,
-    "sourceMap": false,
-    "noEmit": false,
-
-    "baseUrl": ".",
-    "paths": {
-    }
-  }
-}

+ 0 - 7
packages/codemirror-textlint/tsconfig.json

@@ -1,7 +0,0 @@
-{
-  "$schema": "http://json.schemastore.org/tsconfig",
-  "extends": "./tsconfig.base.json",
-  "compilerOptions": {
-    "baseUrl": "."
-  }
-}

Разница между файлами не показана из-за своего большого размера
+ 12 - 576
yarn.lock


Некоторые файлы не были показаны из-за большого количества измененных файлов