Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Use Node.js
uses: actions/setup-node@v5
with:
node-version: '22.x'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -39,4 +44,4 @@ jobs:
npm run build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
6 changes: 3 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v5
with:
node-version: '16.13.0'
node-version: '22.x'
- run: npm ci
- run: npm run build
2 changes: 1 addition & 1 deletion azure-devops-extension-dev.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id":"RestDataMappingPicklistDev",
"version": "0.4.0",
"version": "0.5.0",
"baseUri": "https://localhost:44300",
"public": false,
"private":true
Expand Down
2 changes: 1 addition & 1 deletion azure-devops-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1.0,
"id": "RestDataMappingPicklist",
"publisher": "dedac",
"version": "0.4.0",
"version": "0.5.0",
"name": "Rest Data Mapping Picklist",
"description": "Load work item values from a specified REST endpoint and map additional REST data to your work item",
"public": true,
Expand Down
71 changes: 41 additions & 30 deletions .eslintrc.js → eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,44 +1,62 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';

export default [
{
ignores: ['dist/'],
},
reactPlugin.configs.flat.recommended,
{
files: ['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.es2015,
...globals.node,
},
},
settings: {
react: {
version: 'detect',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'react-hooks': reactHooksPlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,

// Indentation rule
indent: 0,
'@typescript-eslint/indent': ['error', 2],

indent: ['error', 2],

// Force single quotes
quotes: ['error', 'single'],

// Allow logs
'no-console': 1,

// Force no ununsed variables
'no-unused-vars': 2,

// Allow object type
'@typescript-eslint/ban-types': 0,


// Force windows linebreak styles
'linebreak-style': [2, 'unix'],

// Force semicolons
semi: [2, 'always'],

// Turn off explicit return type
'@typescript-eslint/explicit-function-return-type': 0,

// Turn off interface name prefixing
'@typescript-eslint/interface-name-prefix': 0,


// React rules
'react/display-name': 0,
'react/forbid-prop-types': 0,
Expand All @@ -53,7 +71,6 @@ module.exports = {
'react/jsx-no-literals': 0,
'react/jsx-no-undef': 1,
'react/jsx-pascal-case': 1,
'react/jsx-sort-prop-types': 0,
'react/jsx-sort-props': 0,
'react/jsx-uses-react': 1,
'react/jsx-uses-vars': 1,
Expand All @@ -71,16 +88,10 @@ module.exports = {
'react/react-in-jsx-scope': 1,
'react/self-closing-comp': 1,
'react/sort-comp': 1,

// React Hooks rules
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
env: {
browser: true,
es6: true,
node: true,
},
plugins: ['react', 'react-hooks', '@typescript-eslint'],
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],
};
},
];
Loading
Loading