Skip to content

Commit

Permalink
feat: add typescript stylistic rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Harjot1Singh committed Sep 30, 2023
1 parent 43be793 commit 56a418a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions examples/typescript.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/* eslint-disable @typescript-eslint/no-unused-vars */

import { data } from '~/module'

type StringAlias = string

const string:StringAlias = 'string'

type Array1 = string[]
type Array2 = string[]

type GenericType<
T extends string,
U extends number
Expand Down
3 changes: 2 additions & 1 deletion typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/stylistic-type-checked',
'airbnb-typescript',
],
rules: {
Expand Down Expand Up @@ -40,7 +41,7 @@ module.exports = {
tuples: 'always-multiline',
},
],
// Ver broken for some types, so ignoring them makes certain TS-only constructs look nicer
// Very broken for some types, so ignoring them makes certain TS-only constructs look nicer
'@typescript-eslint/indent': [
'error',
2,
Expand Down

0 comments on commit 56a418a

Please sign in to comment.