-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TypeScript support. Drop support for Node 10 and 12. (#584)
* TS conversion part 1 (#564) * TS Part 2 (#565) * Bump prismjs from 1.25.0 to 1.27.0 in /website (#562) Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](PrismJS/prism@v1.25.0...v1.27.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * TS Part 2 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ts part 3 (#566) * Ts part 5 (#567) * ts part 3 * part 5 * Ts part 6 (#568) * ts part 3 * part 5 * Imports * Round 7 (#569) * severity (#570) * Convert more files (#571) * Ts part 10 (#572) * Update .gitignore * Part 10 * Part 11 (#573) * TS Part 12 (#574) * Accept current state for ESLint (#575) * Ts part 14 (#576) * Update esbuild.config.js * Add @types/node * Reporter * Update tsconfig.json * Tests * Define more types * Add build to github workflows * Update tsconfig.json * Bump some deps and rule file path for different file systems (#577) * TS part 16 (#578) * file name formats * lint issues * Update ci.yml * Ts part 16 (#580) * file name formats * lint issues * Update ci.yml * Move docs folder to website * Delete Footer.js * Delete help.js * Delete index.js * Delete versions.js * Convert to v2 config * Update languages.js * Create .gitignore * Upgrade to v2 of docusaurus * Delete versioned docs * Delete main.css * Create styles.module.css * Create index.js * Create help.js * Create custom.css * Update sidebars.json * Update docusaurus.config.js * Update docusaurus.config.js * Update types ref. Remove source from files directory (#582) * Drop support for node 12 (#581) * Add migration docs (#583) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
9a0ef3f
commit ccd1514
Showing
691 changed files
with
13,737 additions
and
30,399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
website | ||
coverage/ | ||
index.d.ts | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
extends: ['eslint-config-tc', 'eslint-config-typescript-tc'], | ||
rules: { | ||
'no-prototype-builtins': 'off', | ||
'unicorn/filename-case': 'off', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires, import/no-extraneous-dependencies */ | ||
|
||
const esbuild = require('esbuild'); | ||
// Automatically exclude all node_modules from the bundled version | ||
const {nodeExternalsPlugin} = require('esbuild-node-externals'); | ||
const {readdirSync} = require('fs'); | ||
const path = require('path'); | ||
|
||
const rulesDirectory = path.join(__dirname, 'src', 'rules'); | ||
const bundle = true; | ||
const minify = true; | ||
const platform = 'node'; | ||
const sourcemap = true; | ||
const target = 'node14'; | ||
const plugins = [nodeExternalsPlugin()]; | ||
|
||
readdirSync(rulesDirectory).forEach((file) => { | ||
const ruleFilePath = path.join(rulesDirectory, file); | ||
const beginIndex = 0; | ||
const endIndex = -3; | ||
const ruleFileNameWithoutExtension = file.slice(beginIndex, endIndex); | ||
|
||
esbuild | ||
.build({ | ||
entryPoints: [ruleFilePath], | ||
outfile: `dist/rules/${ruleFileNameWithoutExtension}.js`, | ||
bundle, | ||
minify, | ||
platform, | ||
sourcemap: false, | ||
target, | ||
plugins, | ||
}) | ||
// eslint-disable-next-line unicorn/no-process-exit | ||
.catch(() => process.exit(1)); | ||
}); | ||
|
||
esbuild | ||
.build({ | ||
entryPoints: ['./src/api.ts'], | ||
outfile: 'dist/api.js', | ||
bundle, | ||
minify, | ||
platform, | ||
sourcemap, | ||
target, | ||
plugins, | ||
}) | ||
// eslint-disable-next-line unicorn/no-process-exit | ||
.catch(() => process.exit(1)); | ||
|
||
esbuild | ||
.build({ | ||
entryPoints: ['./src/cli.ts'], | ||
outfile: 'dist/cli.js', | ||
bundle, | ||
minify, | ||
platform, | ||
sourcemap, | ||
target, | ||
plugins, | ||
}) | ||
// eslint-disable-next-line unicorn/no-process-exit | ||
.catch(() => process.exit(1)); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.