Name Date Size

..25-Oct-20244 KiB

.editorconfigH A D25-Oct-202495

.eslintignoreH A D25-Oct-2024772

.eslintrc.jsonH A D25-Oct-20249.1 KiB

.prettierignoreH A D25-Oct-2024772

.prettierrc.jsonH A D25-Oct-2024180

bin/H25-Oct-20244 KiB

compare_branches.pyH A D25-Oct-20242.7 KiB

cookbook_convertor/H25-Oct-20244 KiB

docs/rules/H25-Oct-20244 KiB

lib/H25-Oct-20244 KiB

package.jsonH A D25-Oct-20242.1 KiB

README.mdH A D25-Oct-20242.7 KiB

scripts/H25-Oct-20244 KiB

src/H25-Oct-20244 KiB

stats_calculator/H25-Oct-20244 KiB

test/H25-Oct-202432 KiB

test_extended_features/H25-Oct-20244 KiB

test_linter.shH A D25-Oct-2024858

test_regression/H25-Oct-20244 KiB

test_rules/H25-Oct-202416 KiB

tsconfig.jsonH A D25-Oct-2024340

tslinter.batH A D25-Oct-2024709

tslinter.shH A D25-Oct-2024834

utils/H25-Oct-20244 KiB

webpack.config.jsH A D25-Oct-2024840

README.md

1# TypeScript linter
2
3Typescript linter ( further mentioned as 'linter' ) is a tool to check typescript sources and find language elements
4and constructions which are deprecated to use in a purpose to migrate sources to STS.
5The linter is currently under development.
6
7## Prerequisits
8
9### Visual Studio Code
10
11For development, it's recommended to use `VS Code`, as it has a full built-in support for TypeScript language.
12
13### NodeJS and NPM
14
15Install the latest stable version of `NodeJS` and `NPM`. It is recommended using a `Node version manager` to install Node and NPM ([nvm](https://github.com/nvm-sh/nvm) for Linux; [nvm-windows](https://github.com/coreybutler/nvm-windows) for windows - v1.1.9 is the most stable). You can also follow the [official guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).
16
17## Building
18
19Run the following command to install all project dependencies and build the project:
20
21```bash
22npm install
23```
24
25Run the following command to only build project sources:
26
27```bash
28npm run build
29```
30
31## Running
32
33Run the following command from the same directory:
34
35```bash
36node dist/tslinter.js [options] [input files]
37```
38
39Note: Before linting a project, it is highly recommended to install all project dependencies (with `npm install` or any other methods -- depends on the concrete project).
40
41You can also use command files `tslinter.sh` or `tslinter.bat` with same arguments as for direct launch.
42
43Possible command options:
44
45`--deveco-plugin-mode` - this options defines special mode to launch from IDE and should NOT be used when running from command line.
46
47`--project-folder <path>` - defines path to folder with TypeScript sources and subfolders which linter walks recurscevely. This option may be repeated in command line with different paths.
48
49`-p, --project <path>` - defines path to TS project configuration file (commonly known as tsconfig.json). If no input file is defined directly as command-line argument, then all source files from tsconfig.json will be processed by linter. Otherwise, linter will only process input files from command-line, that are included into project (i.e. files that belong to intersection of input files from command-line and tsconfig.json file).
50
51`-E, --TSC_Errors` - enables logging messages about compilation errors and unresolved symbols.
52
53All other command line arguments are considered as paths to TypeScript files.
54
55To prevent command line buffer overflow, response file may be used. It is specified by adding `@` prefix to file name (e.g.: `tslinter.sh @response-file.txt` ). Response file should contain TypeScript source paths (one at each line). The response file argument should be the last command argument (any following argument will be ignored).
56
57## Running tests
58
59Run the following command:
60
61```bash
62npm test
63```
64