
Security News
PyPI Expands Trusted Publishing to GitLab Self-Managed as Adoption Passes 25 Percent
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads
eslint-plugin-typescript
Advanced tools
TypeScript support for ESLint. (This is still in the very early stages, so please be patient.)
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install typescript-eslint-parser:
$ npm install typescript-eslint-parser --save-dev
Last, install eslint-plugin-typescript:
$ npm install eslint-plugin-typescript --save-dev
Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-typescript globally.
Add typescript-eslint-parser to the parser field and typescript to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"parser": "typescript-eslint-parser",
"plugins": [
"typescript"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"typescript/rule-name": "error"
}
}
typescript/adjacent-overload-signatures — Require that member overloads be consecutivetypescript/class-name-casing — Require PascalCased class and interface names (class-name from TSLint)typescript/explicit-function-return-type — Require explicit return types on functions and class methodstypescript/explicit-member-accessibility — Require explicit accessibility modifiers on class properties and methods (member-access from TSLint)typescript/generic-type-naming — Enforces naming of generic type variablestypescript/interface-name-prefix — Require that interface names be prefixed with I (interface-name from TSLint)typescript/member-delimiter-style — Require a specific member delimiter style for interfaces and type literalstypescript/member-naming — Enforces naming conventions for class members by visibility.typescript/member-ordering — Require a consistent member declaration order (member-ordering from TSLint)typescript/no-angle-bracket-type-assertion — Enforces the use of as Type assertions instead of <Type> assertions (no-angle-bracket-type-assertion from TSLint)typescript/no-array-constructor — Disallow generic Array constructorstypescript/no-empty-interface — Disallow the declaration of empty interfaces (no-empty-interface from TSLint)typescript/no-explicit-any — Disallow usage of the any type (no-any from TSLint)typescript/no-inferrable-types — Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean. (no-inferrable-types from TSLint)typescript/no-namespace — Disallow the use of custom TypeScript modules and namespacestypescript/no-non-null-assertion — Disallows non-null assertions using the ! postfix operator (no-non-null-assertion from TSLint)typescript/no-parameter-properties — Disallow the use of parameter properties in class constructors. (no-parameter-properties from TSLint)typescript/no-triple-slash-reference — Disallow /// <reference path="" /> comments (no-reference from TSLint)typescript/no-type-alias — Disallow the use of type aliases (interface-over-type-literal from TSLint)typescript/no-unused-vars — Prevent TypeScript-specific constructs from being erroneously flagged as unusedtypescript/no-use-before-define — Disallow the use of variables before they are definedtypescript/no-var-requires — Disallows the use of require statements except in import statements (no-var-requires from TSLint)typescript/prefer-namespace-keyword — Require the use of the namespace keyword instead of the module keyword to declare custom TypeScript modules. (no-internal-module from TSLint)typescript/type-annotation-spacing — Require consistent spacing around type annotationsFAQs
TypeScript plugin for ESLint
The npm package eslint-plugin-typescript receives a total of 47,781 weekly downloads. As such, eslint-plugin-typescript popularity was classified as popular.
We found that eslint-plugin-typescript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.

Security News
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.