Skip to content

Commit 170f804

Browse files
ESLint version upgrade to 9 (#365)
* ESLint version bumped to 9 * eslint fixes for whole project * Build fix
1 parent a099929 commit 170f804

File tree

1,556 files changed

+9719
-11659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,556 files changed

+9719
-11659
lines changed

eslint.config.mjs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import stylisticTs from '@stylistic/eslint-plugin-ts'
5+
6+
/** @type {import('eslint').Linter.Config[]} */
7+
export default [
8+
{
9+
files: ['**/*.{js,mjs,cjs,ts}'],
10+
},
11+
{
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
},
17+
},
18+
},
19+
{
20+
plugins: {
21+
'@stylistic/ts': stylisticTs,
22+
},
23+
},
24+
pluginJs.configs.recommended,
25+
...tseslint.configs.recommended,
26+
{
27+
rules: {
28+
'@stylistic/ts/comma-dangle': ['error', 'always-multiline'],
29+
'@stylistic/ts/indent': ['error', 2],
30+
'@stylistic/ts/object-curly-newline': ['error', { consistent: true }],
31+
'@stylistic/ts/object-curly-spacing': ['error', 'always'],
32+
'@stylistic/ts/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
33+
'@stylistic/ts/quotes': ['error', 'single'],
34+
'@stylistic/ts/quote-props': ['error', 'as-needed'],
35+
'@typescript-eslint/consistent-type-imports': 'error',
36+
},
37+
},
38+
];

examples/src/addFixVersion.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ async function addFixVersion() {
1515
const fix = await client.issueProperties.setIssueProperty({
1616
issueIdOrKey,
1717
propertyKey: 'fixVersion',
18-
// @ts-ignore
1918
propertyValue: 'N/a',
2019
});
2120

examples/src/credentials.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
21
export const host = '';
32
export const email = '';
43
export const apiToken = '';

examples/src/getAllWorklogs.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ async function getAllWorklogs() {
2525
let total = 0;
2626

2727
do {
28-
// eslint-disable-next-line no-await-in-loop
2928
const worklogsPaginated = await client.issueWorklogs.getIssueWorklog({ issueIdOrKey: issue.key, startAt: offset });
3029

3130
offset += worklogsPaginated.worklogs.length;

examples/src/utils/addWorklog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Version3Client, Version3Models } from 'jira.js';
1+
import type { Version3Client, Version3Models } from 'jira.js';
22

33
export const addWorklog = async (client: Version3Client, issue: Version3Models.Issue) => {
44
await client.issueWorklogs.addWorklog({

examples/src/utils/createIssue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Version3Client } from 'jira.js';
1+
import type { Version3Client } from 'jira.js';
22

33
export const createIssue = async (client: Version3Client) => {
44
const { values: projects } = await client.projects.searchProjects();

0 commit comments

Comments
 (0)