-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migrate to typescript-eslint v7
- Loading branch information
1 parent
105750d
commit ea69796
Showing
19 changed files
with
1,285 additions
and
6,844 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "extends": "./" } |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
# This file should only cover artifacts caused by the source code in this | ||
# repository, not those caused by the personal choice of editor and/or | ||
# environment of a developer. | ||
# see ADR 5 in https://github.com/NordicSemiconductor/asset-tracker-cloud-docs/ | ||
node_modules/ | ||
npm-debug.log |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
# TypeScript ESLint Config [![npm version](https://img.shields.io/npm/v/@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript.svg)](https://www.npmjs.com/package/@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript) | ||
# TypeScript ESLint Config [![npm version](https://img.shields.io/npm/v/@bifravst/eslint-config-typescript.svg)](https://www.npmjs.com/package/@bifravst/eslint-config-typescript) | ||
|
||
[![GitHub Actions](https://github.com/NordicSemiconductor/asset-tracker-cloud-eslint-config-typescript/workflows/Semantic%20Release/badge.svg)](https://github.com/NordicSemiconductor/asset-tracker-cloud-eslint-config-typescript/actions) | ||
[![GitHub Actions](https://github.com/bifravst/eslint-config-typescript/workflows/Semantic%20Release/badge.svg)](https://github.com/bifravst/eslint-config-typescript/actions) | ||
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) | ||
[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com) | ||
[![@commitlint/config-conventional](https://img.shields.io/badge/%40commitlint-config--conventional-brightgreen)](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional) | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/) | ||
[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint) | ||
|
||
ESLint configuration (with | ||
[TypeScript support](https://github.com/typescript-eslint/typescript-eslint)) | ||
for all nRF Asset Tracker projects. | ||
ESLint configuration (with [TypeScript support](https://typescript-eslint.io/)) | ||
for all our projects. | ||
|
||
See | ||
[@nordicsemiconductor/asset-tracker-cloud-code-style](https://github.com/NordicSemiconductor/asset-tracker-cloud-code-style-js#readme) | ||
for usage. | ||
|
||
## Installation | ||
|
||
npm i --save-dev --save-exact @nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript | ||
npm i --save-dev --save-exact @bifravst/eslint-config-typescript | ||
|
||
## Usage | ||
|
||
echo '{"extends": "@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript"}' > .eslintrc | ||
echo '{"extends": "@bifravst/eslint-config-typescript"}' > .eslintrc.json |
File renamed without changes.
12 changes: 0 additions & 12 deletions
12
adr/004-move-to-nordicsemiconductor-github-organization.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { extends: ["@commitlint/config-conventional"] }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js' | ||
import tseslint from 'typescript-eslint' | ||
import unicorn from 'eslint-plugin-unicorn' | ||
import preferArrow from 'eslint-plugin-prefer-arrow' | ||
import prettier from 'eslint-config-prettier' | ||
import * as importPlugin from 'eslint-plugin-import' | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommendedTypeChecked, | ||
{ | ||
languageOptions: { | ||
parserOptions: { | ||
project: true, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
}, | ||
prettier, | ||
unicorn.configs['flat/all'], | ||
{ plugins: { 'prefer-arrow': preferArrow, import: importPlugin } }, | ||
{ | ||
rules: { | ||
'@typescript-eslint/indent': ['off'], | ||
'@typescript-eslint/no-object-literal-type-assertion': ['off'], | ||
'@typescript-eslint/explicit-function-return-type': ['off'], | ||
'@typescript-eslint/await-thenable': ['error'], | ||
'@typescript-eslint/no-extraneous-class': ['error'], | ||
'@typescript-eslint/no-floating-promises': ['error'], | ||
'@typescript-eslint/no-for-in-array': ['error'], | ||
'@typescript-eslint/no-require-imports': ['error'], | ||
'@typescript-eslint/no-this-alias': ['error'], | ||
'@typescript-eslint/no-type-alias': ['off'], | ||
'@typescript-eslint/no-unnecessary-type-assertion': ['error'], | ||
'@typescript-eslint/no-useless-constructor': ['error'], | ||
'@typescript-eslint/prefer-for-of': ['error'], | ||
'@typescript-eslint/prefer-function-type': ['error'], | ||
'@typescript-eslint/prefer-includes': ['error'], | ||
'@typescript-eslint/prefer-readonly': ['error'], | ||
'@typescript-eslint/prefer-regexp-exec': ['error'], | ||
'@typescript-eslint/prefer-string-starts-ends-with': ['error'], | ||
'@typescript-eslint/promise-function-async': ['error'], | ||
'@typescript-eslint/require-array-sort-compare': ['error'], | ||
'@typescript-eslint/restrict-plus-operands': ['error'], | ||
semi: 'off', | ||
'@typescript-eslint/semi': ['off'], | ||
'@typescript-eslint/member-delimiter-style': [ | ||
'error', | ||
{ | ||
multiline: { | ||
delimiter: 'none', | ||
requireLast: false, | ||
}, | ||
singleline: { | ||
delimiter: 'semi', | ||
requireLast: false, | ||
}, | ||
}, | ||
], | ||
'@typescript-eslint/prefer-interface': ['off'], | ||
'@typescript-eslint/consistent-type-definitions': ['error', 'type'], | ||
'@typescript-eslint/no-explicit-any': ['off'], | ||
'no-console': ['off'], | ||
'@typescript-eslint/strict-boolean-expressions': ['error'], | ||
'@typescript-eslint/prefer-nullish-coalescing': ['error'], | ||
'@typescript-eslint/prefer-optional-chain': ['error'], | ||
'@typescript-eslint/explicit-module-boundary-types': ['error'], | ||
'prefer-promise-reject-errors': ['error'], | ||
'unicorn/prefer-string-slice': ['error'], | ||
'@typescript-eslint/switch-exhaustiveness-check': ['error'], | ||
'prefer-arrow/prefer-arrow-functions': ['error'], | ||
'object-shorthand': ['error'], | ||
'import/extensions': ['error', 'always', { ignorePackages: true }], | ||
}, | ||
}, | ||
{ | ||
ignores: ['eslint.config.js'], | ||
}, | ||
) |
Oops, something went wrong.