Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c30a8ae

Browse files
committedAug 8, 2024
TypeScript conversion
Testing in progress
1 parent fe87c81 commit c30a8ae

17 files changed

+12733
-12694
lines changed
 

‎.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"presets": ["@babel/preset-env", "minify"],
33
"comments": false
4-
}
4+
}

‎.gitignore

+192-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,103 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/windows,jetbrains+all,node,vue,vuejs,nuxtjs,yarn
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,jetbrains+all,node,vue,vuejs,nuxtjs,yarn
3+
4+
### JetBrains+all ###
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/**/usage.statistics.xml
12+
.idea/**/dictionaries
13+
.idea/**/shelf
14+
15+
# AWS User-specific
16+
.idea/**/aws.xml
17+
18+
# Generated files
19+
.idea/**/contentModel.xml
20+
21+
# Sensitive or high-churn files
22+
.idea/**/dataSources/
23+
.idea/**/dataSources.ids
24+
.idea/**/dataSources.local.xml
25+
.idea/**/sqlDataSources.xml
26+
.idea/**/dynamic.xml
27+
.idea/**/uiDesigner.xml
28+
.idea/**/dbnavigator.xml
29+
30+
# Gradle
31+
.idea/**/gradle.xml
32+
.idea/**/libraries
33+
34+
# Gradle and Maven with auto-import
35+
# When using Gradle or Maven with auto-import, you should exclude module files,
36+
# since they will be recreated, and may cause churn. Uncomment if using
37+
# auto-import.
38+
# .idea/artifacts
39+
# .idea/compiler.xml
40+
# .idea/jarRepositories.xml
41+
# .idea/modules.xml
42+
# .idea/*.iml
43+
# .idea/modules
44+
# *.iml
45+
# *.ipr
46+
47+
# CMake
48+
cmake-build-*/
49+
50+
# Mongo Explorer plugin
51+
.idea/**/mongoSettings.xml
52+
53+
# File-based project format
54+
*.iws
55+
56+
# IntelliJ
57+
out/
58+
59+
# mpeltonen/sbt-idea plugin
60+
.idea_modules/
61+
62+
# JIRA plugin
63+
atlassian-ide-plugin.xml
64+
65+
# Cursive Clojure plugin
66+
.idea/replstate.xml
67+
68+
# SonarLint plugin
69+
.idea/sonarlint/
70+
71+
# Crashlytics plugin (for Android Studio and IntelliJ)
72+
com_crashlytics_export_strings.xml
73+
crashlytics.properties
74+
crashlytics-build.properties
75+
fabric.properties
76+
77+
# Editor-based Rest Client
78+
.idea/httpRequests
79+
80+
# Android studio 3.1+ serialized cache file
81+
.idea/caches/build_file_checksums.ser
82+
83+
### JetBrains+all Patch ###
84+
# Ignore everything but code style settings and run configurations
85+
# that are supposed to be shared within teams.
86+
87+
.idea/*
88+
89+
!.idea/codeStyles
90+
!.idea/runConfigurations
91+
92+
### Node ###
193
# Logs
294
logs
395
*.log
496
npm-debug.log*
597
yarn-debug.log*
698
yarn-error.log*
799
lerna-debug.log*
100+
.pnpm-debug.log*
8101

9102
# Diagnostic reports (https://nodejs.org/api/report.html)
10103
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
@@ -53,6 +146,9 @@ web_modules/
53146
# Optional eslint cache
54147
.eslintcache
55148

149+
# Optional stylelint cache
150+
.stylelintcache
151+
56152
# Microbundle cache
57153
.rpt2_cache/
58154
.rts2_cache_cjs/
@@ -68,9 +164,12 @@ web_modules/
68164
# Yarn Integrity file
69165
.yarn-integrity
70166

71-
# dotenv environment variables file
167+
# dotenv environment variable files
72168
.env
73-
.env.test
169+
.env.development.local
170+
.env.test.local
171+
.env.production.local
172+
.env.local
74173

75174
# parcel-bundler cache (https://parceljs.org/)
76175
.cache
@@ -93,6 +192,12 @@ dist
93192
# vuepress build output
94193
.vuepress/dist
95194

195+
# vuepress v2.x temp and cache directory
196+
.temp
197+
198+
# Docusaurus cache and generated files
199+
.docusaurus
200+
96201
# Serverless directories
97202
.serverless/
98203

@@ -114,3 +219,88 @@ dist
114219
.yarn/build-state.yml
115220
.yarn/install-state.gz
116221
.pnp.*
222+
223+
### Node Patch ###
224+
# Serverless Webpack directories
225+
.webpack/
226+
227+
# Optional stylelint cache
228+
229+
# SvelteKit build / generate output
230+
.svelte-kit
231+
232+
### NuxtJS ###
233+
# Generated dirs
234+
.nuxt-*
235+
.output
236+
.gen
237+
238+
# Node dependencies
239+
node_modules
240+
241+
# System files
242+
243+
### Vue ###
244+
# gitignore template for Vue.js projects
245+
#
246+
# Recommended template: Node.gitignore
247+
248+
# TODO: where does this rule come from?
249+
docs/_book
250+
251+
# TODO: where does this rule come from?
252+
test/
253+
254+
### Vuejs ###
255+
# Recommended template: Node.gitignore
256+
257+
dist/
258+
npm-debug.log
259+
yarn-error.log
260+
261+
### Windows ###
262+
# Windows thumbnail cache files
263+
Thumbs.db
264+
Thumbs.db:encryptable
265+
ehthumbs.db
266+
ehthumbs_vista.db
267+
268+
# Dump file
269+
*.stackdump
270+
271+
# Folder config file
272+
[Dd]esktop.ini
273+
274+
# Recycle Bin used on file shares
275+
$RECYCLE.BIN/
276+
277+
# Windows Installer files
278+
*.cab
279+
*.msi
280+
*.msix
281+
*.msm
282+
*.msp
283+
284+
# Windows shortcuts
285+
*.lnk
286+
287+
### yarn ###
288+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
289+
290+
.yarn/*
291+
!.yarn/releases
292+
!.yarn/patches
293+
!.yarn/plugins
294+
!.yarn/sdks
295+
!.yarn/versions
296+
297+
# if you are NOT using Zero-installs, then:
298+
# comment the following lines
299+
!.yarn/cache
300+
301+
# and uncomment the following lines
302+
# .pnp.*
303+
304+
# End of https://www.toptal.com/developers/gitignore/api/windows,jetbrains+all,node,vue,vuejs,nuxtjs,yarn
305+
306+
.data/*

‎.prettierrc.mjs

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const config = {
2+
printWidth: 200,
3+
tabWidth: 4,
4+
semi: true,
5+
trailingComma: 'es5',
6+
singleQuote: true,
7+
bracketSameLine: true,
8+
endOfLine: 'lf',
9+
};
10+
11+
export default config;

‎.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

‎eslint.config.mjs

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pluginJs from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
4+
export default [
5+
{
6+
files: ['**/*.{ts}'],
7+
rules: {
8+
'@typescript-eslint/no-explicit-any': 'off',
9+
'@typescript-eslint/ban-ts-comment': 'off',
10+
},
11+
},
12+
pluginJs.configs.recommended,
13+
...tseslint.configs.recommended,
14+
];

‎lib/index.js

-1
This file was deleted.

‎lib/main.d.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export default class Grammarify {
2+
private readonly substitutionMap;
3+
private preProcessMap;
4+
private smsMap;
5+
private disconnectedMap;
6+
constructor(substitutionMap: any);
7+
clean(string: string): any;
8+
}
9+
//# sourceMappingURL=main.d.ts.map

‎lib/main.d.ts.map

+1
Original file line numberDiff line numberDiff line change

0 commit comments

Comments
 (0)