Skip to content

Commit

Permalink
ESLint version bumped to 9
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Mar 5, 2025
1 parent a099929 commit 2ad508e
Show file tree
Hide file tree
Showing 844 changed files with 3,166 additions and 5,126 deletions.
38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylisticTs from '@stylistic/eslint-plugin-ts'

/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ['**/*.{js,mjs,cjs,ts}'],
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
plugins: {
'@stylistic/ts': stylisticTs,
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'@stylistic/ts/comma-dangle': ['error', 'always-multiline'],
'@stylistic/ts/indent': ['error', 2],
'@stylistic/ts/object-curly-newline': ['error', { consistent: true }],
'@stylistic/ts/object-curly-spacing': ['error', 'always'],
'@stylistic/ts/object-property-newline': ['error', { allowAllPropertiesOnSameLine: true }],
'@stylistic/ts/quotes': ['error', 'single'],
'@stylistic/ts/quote-props': ['error', 'as-needed'],
'@typescript-eslint/consistent-type-imports': 'error',
},
},
];
1 change: 0 additions & 1 deletion examples/src/addFixVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ async function addFixVersion() {
const fix = await client.issueProperties.setIssueProperty({
issueIdOrKey,
propertyKey: 'fixVersion',
// @ts-ignore
propertyValue: 'N/a',
});

Expand Down
1 change: 0 additions & 1 deletion examples/src/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
export const host = '';
export const email = '';
export const apiToken = '';
Expand Down
1 change: 0 additions & 1 deletion examples/src/getAllWorklogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ async function getAllWorklogs() {
let total = 0;

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

offset += worklogsPaginated.worklogs.length;
Expand Down
2 changes: 1 addition & 1 deletion examples/src/utils/addWorklog.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Version3Client, Version3Models } from 'jira.js';
import type { Version3Client, Version3Models } from 'jira.js';

export const addWorklog = async (client: Version3Client, issue: Version3Models.Issue) => {
await client.issueWorklogs.addWorklog({
Expand Down
2 changes: 1 addition & 1 deletion examples/src/utils/createIssue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Version3Client } from 'jira.js';
import type { Version3Client } from 'jira.js';

export const createIssue = async (client: Version3Client) => {
const { values: projects } = await client.projects.searchProjects();
Expand Down
Loading

0 comments on commit 2ad508e

Please sign in to comment.