{"id":28566436,"url":"https://github.com/js-devtools/tslint-modular","last_synced_at":"2025-07-19T04:32:16.790Z","repository":{"id":57122426,"uuid":"163524702","full_name":"JS-DevTools/tslint-modular","owner":"JS-DevTools","description":"Modular configuration rules for TSLint ","archived":false,"fork":false,"pushed_at":"2020-07-18T22:38:39.000Z","size":840,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-11T20:44:51.831Z","etag":null,"topics":["config","javascript","shareable-configs","styleguide","tslint","typescript"],"latest_commit_sha":null,"homepage":"https://jstools.dev/tslint-modular","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JS-DevTools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-29T16:23:38.000Z","updated_at":"2021-11-16T18:23:03.000Z","dependencies_parsed_at":"2022-08-24T14:59:29.107Z","dependency_job_id":null,"html_url":"https://github.com/JS-DevTools/tslint-modular","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/JS-DevTools/tslint-modular","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Ftslint-modular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Ftslint-modular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Ftslint-modular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Ftslint-modular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JS-DevTools","download_url":"https://codeload.github.com/JS-DevTools/tslint-modular/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JS-DevTools%2Ftslint-modular/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265888901,"owners_count":23844527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","javascript","shareable-configs","styleguide","tslint","typescript"],"created_at":"2025-06-10T15:10:53.473Z","updated_at":"2025-07-19T04:32:16.763Z","avatar_url":"https://github.com/JS-DevTools.png","language":"JavaScript","readme":"Modular TSLint Configuration\n===============================\n\n[![Cross-Platform Compatibility](https://jstools.dev/img/badges/os-badges.svg)](https://github.com/JS-DevTools/tslint-modular/actions)\n[![Build Status](https://github.com/JS-DevTools/tslint-modular/workflows/CI-CD/badge.svg)](https://github.com/JS-DevTools/tslint-modular/actions)\n\n[![Coverage Status](https://coveralls.io/repos/github/JS-DevTools/tslint-modular/badge.svg?branch=master)](https://coveralls.io/github/JS-DevTools/tslint-modular)\n[![Dependencies](https://david-dm.org/JS-DevTools/tslint-modular/dev-status.svg)](https://david-dm.org/JS-DevTools/tslint-modular?type=dev)\n\n[![npm](https://img.shields.io/npm/v/@jsdevtools/tslint-modular.svg)](https://www.npmjs.com/package/@jsdevtools/tslint-modular)\n[![License](https://img.shields.io/npm/l/@jsdevtools/tslint-modular.svg)](LICENSE)\n[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/JS-DevTools/tslint-modular)\n\nTSLint Modular is a set of [configuration presets](https://palantir.github.io/tslint/usage/configuration/#configuration-presets) for [TSLint](https://palantir.github.io/tslint/) that's broken-up into different modules that can be mixed-and-matched to match the needs of your project.\n\nEach module defines rules that are meant to be reasonable defaults and best practices, but you can easily extend or override any of the rules to suit your needs.\n\n\n\nRelated Projects\n-----------------------\n- [eslint-config-modular](https://jstools.dev/eslint-config-modular)\u003cbr\u003e\n  Modular ESLint configuration\n\n- [@jsdevtools/eslint-config](https://jstools.dev/eslint-config)\u003cbr\u003e\n  Opinionated JSDevTools ESLint config for JavaScript, TypeScript, and JSX\n\n\n\nInstallation\n-----------------------\nRun the following [npm](https://docs.npmjs.com/about-npm/) command to install [TSLint](https://palantir.github.io/tslint/) and `@jsdevtools/tslint-modular` as dev-dependencies of your project:\n\n```bash\nnpm install tslint @jsdevtools/tslint-modular --save-dev\n```\n\n\n\nUsage\n-----------------------\nConfiguration presets are designed to work with the `extends` feature of `tslint.yaml` files. You can learn more about\n[configuration presets](https://palantir.github.io/tslint/usage/configuration/#configuration-presets) on the official TSLint website.\n\nTo use TSLint Modular in your project, create a `tslint.yaml` file with the following contents:\n\n**tslint.yaml**\n```yaml\nextends:\n  # These modules would be good for a library that runs in Node.js and web browsers\n  - \"@jsdevtools/tslint-modular/best-practices\"\n  - \"@jsdevtools/tslint-modular/style\"\n  - \"@jsdevtools/tslint-modular/node\"\n  - \"@jsdevtools/tslint-modular/browser\"\n\nrules:\n  # You can override or extend the rules here\n```\n\n\n\nModules\n-----------------------\nTSLint Modular includes the following modules.  Mix-and-match them as applicable to your project.\n\n### `@jsdevtools/tslint-modular/best-practices` \u003csmall\u003e[(source)](./best-practices/index.js)\u003c/small\u003e\nContains rules that prevent accidental bugs, insecure code, and bad coding practices.  You can use this module directly, or use any/all of its sub-modules.\n\n#### `@jsdevtools/tslint-modular/best-practices/bugs` \u003csmall\u003e[(source)](./best-practices/bugs.js)\u003c/small\u003e\nPrevents syntax that is likely to lead to accidental bugs or runtime errors.  Examples include not [duplicate variables](https://palantir.github.io/tslint/rules/no-duplicate-variable/), and [using `===` instead of `==`](https://palantir.github.io/tslint/rules/triple-equals) for comparisons. Most of the rules in this file will raise an error if violated, but some less-severe ones will only raise warnings.\n\n#### `@jsdevtools/tslint-modular/best-practices/maintainability` \u003csmall\u003e[(source)](./best-practices/maintainability.js)\u003c/small\u003e\nHelps you write code that is more maintainable over time and by multiple people.  For example, [limiting cyclomatic complexity](https://palantir.github.io/tslint/rules/cyclomatic-complexity) and [keeping files short](https://palantir.github.io/tslint/rules/max-file-line-count).\n\n#### `@jsdevtools/tslint-modular/best-practices/security` \u003csmall\u003e[(source)](./best-practices/security.js)\u003c/small\u003e\nHelps enforce security best-practices such as [avoiding the `eval()` statement](https://palantir.github.io/tslint/rules/no-eval) and [not calling the `Function` constructor](https://palantir.github.io/tslint/rules/function-constructor).\n\n### `@jsdevtools/tslint-modular/browser` \u003csmall\u003e[(source)](./browser/index.js)\u003c/small\u003e\nBans bad practices for web-based code, such as [the `alert()` statement](https://eslint.org/docs/rules/no-alert#disallow-use-of-alert-no-alert) and the jQuery global.\n\n### `@jsdevtools/tslint-modular/node` \u003csmall\u003e[(source)](./node/index.js)\u003c/small\u003e\nDiscourages deprecated and outdated Node.js code, such as [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback). It encourages using more modern syntax, such as [the `fs.promises` API](https://nodejs.org/api/fs.html#fs_fs_promises_api).\n\n### `@jsdevtools/tslint-modular/style` \u003csmall\u003e[(source)](./style/index.js)\u003c/small\u003e\nContains code-styling and consistency rules.    You can use this module directly, or use any/all of its sub-modules.\n\n#### `@jsdevtools/tslint-modular/style/comments` \u003csmall\u003e[(source)](./style/comments.js)\u003c/small\u003e\nCode-commenting rules, such as [documenting all public members](https://palantir.github.io/tslint/rules/completed-docs/), using [JSDoc format](https://palantir.github.io/tslint/rules/jsdoc-format/), and not [duplicating type information](https://palantir.github.io/tslint/rules/no-redundant-jsdoc/) in comments.\n\n#### `@jsdevtools/tslint-modular/style/conventions` \u003csmall\u003e[(source)](./style/conventions.js)\u003c/small\u003e\nEnforces an **opinionated** set of conventions, such as using [double-quotes](https://palantir.github.io/tslint/rules/quotemark/) and [semi-colons](https://palantir.github.io/tslint/rules/semicolon).\n\n#### `@jsdevtools/tslint-modular/style/naming` \u003csmall\u003e[(source)](./style/naming.js)\u003c/small\u003e\nEncourages good JavaScript naming conventions, such as [camel-case variables](https://palantir.github.io/tslint/rules/variable-name) and [capitialized classes](https://palantir.github.io/tslint/rules/class-name).\n\n#### `@jsdevtools/tslint-modular/style/syntax` \u003csmall\u003e[(source)](./style/syntax.js)\u003c/small\u003e\nDisallows outdated, nonstandard, and confusing syntax.  Examples include [labels](https://palantir.github.io/tslint/rules/label-position), [the comma operator](https://palantir.github.io/tslint/rules/ban-comma-operator), and [parameter properties](https://palantir.github.io/tslint/rules/no-parameter-properties).\n\n#### `@jsdevtools/tslint-modular/style/whitespace` \u003csmall\u003e[(source)](./style/whitespace.js)\u003c/small\u003e\nEnforces **opinionated** whitespace rules, such as [two-space indentation](https://palantir.github.io/tslint/rules/indent), [opening braces on the same line](https://palantir.github.io/tslint/rules/one-line), and [type definition spacing](https://palantir.github.io/tslint/rules/typedef-whitespace).\n\n### `@jsdevtools/tslint-modular/test` \u003csmall\u003e[(source)](./test/index.js)\u003c/small\u003e\nWarns about `describe.only()` and `it.only()` calls that may have accidentally been left in your test code.\n\n\u003e **Note:** We recommend that you create a separate `tslint.yaml` file in your test folder. That way, it can use different modules and rules than the rest of your codebase.\n\n\n\nLicense\n--------------------------\nTSLint Modular is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.\n\nThis package is [Treeware](http://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/JS-DevTools/tslint-modular) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.\n\n\n\nBig Thanks To\n--------------------------\nThanks to these awesome companies for their support of Open Source developers ❤\n\n[![Travis CI](https://jstools.dev/img/badges/travis-ci.svg)](https://travis-ci.com)\n[![SauceLabs](https://jstools.dev/img/badges/sauce-labs.svg)](https://saucelabs.com)\n[![Coveralls](https://jstools.dev/img/badges/coveralls.svg)](https://coveralls.io)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Ftslint-modular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjs-devtools%2Ftslint-modular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjs-devtools%2Ftslint-modular/lists"}