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
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

80 changes: 0 additions & 80 deletions .eslintrc.json

This file was deleted.

14 changes: 7 additions & 7 deletions .github/workflows/verify_cla_signature_pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Checking CLA Signature
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context
# The pull request target event provides RW token to github
# The pull request target event provides RW token to github
# https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
# But `on: pull_request_target` should be avoided due to security
# reasons. Read more: [SEC_ADV_1] https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
#
#
# We will use a mix of github pull_request that does not provide any write access to pull requests on forks
# and workflow event, as discussed in [SEC_ADV_1]

on:
on:
pull_request:
branches:
- main
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
cat ./.tmp/github.json
echo "commit details: "
cat ./.tmp/commitDetails.json

- name: Review pull request
run: |
which git
Expand All @@ -58,12 +58,12 @@ jobs:
env:
EMPLOYER_CLA_LINK: https://raw.githubusercontent.com/aicore/contributor-license-agreement/main/employer_contributor_license_agreement.md
PERSONAL_CLA_LINK: https://raw.githubusercontent.com/aicore/contributor-license-agreement/main/personal_contributor_licence_agreement.md
- uses: actions/upload-artifact@v3

- uses: actions/upload-artifact@v4
with:
name: prcontext
path: .tmp/

- name: Fail on validation errors
run: |
FILE=./.tmp/failed
Expand Down
87 changes: 87 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
export default [
{
files: ['src/**', 'test/**'],
ignores: [
'**/node_modules/**',
'src/thirdparty/**',
'src/**/*-min.js',
'src/**/*.min.js'
],
languageOptions: {
ecmaVersion: 2022, // Automatically sets up appropriate ECMAScript features
sourceType: 'module',
globals: {
process: 'readonly', // Assume process is a global variable (specific to Node.js)
setTimeout: 'readonly', // Assume setTimeout is a global variable
clearTimeout: 'readonly', // Added clearTimeout
global: 'readonly', // Added global
console: 'readonly',
structuredClone: 'readonly', // Add structuredClone as a global
beforeEach: 'readonly', // Testing framework globals
it: 'readonly',
describe: 'readonly'
}
},
rules: {
'no-caller': 'error',
'no-control-regex': 'error',
'no-empty': 'warn',
'no-invalid-regexp': 'error',
'no-regex-spaces': 'error',
'no-unsafe-negation': 'warn',
'valid-jsdoc': 'off',
'valid-typeof': 'error',
'curly': 'error',
'eqeqeq': ['error', 'smart'],
'guard-for-in': 'off',
'no-else-return': 'warn',
'no-fallthrough': 'error',
'no-invalid-this': 'warn',
'no-iterator': 'error',
'no-loop-func': 'error',
'no-multi-str': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-new': 'error',
'no-proto': 'error',
'no-redeclare': 'warn',
'no-script-url': 'error',
'wrap-iife': ['error', 'outside'],
'strict': 'error',
'no-shadow-restricted-names': 'error',
'no-shadow': 'warn',
'no-undef': 'error',
'no-unused-vars': ['warn', {'vars': 'all', 'args': 'none'}],
'no-use-before-define': 'off',
'no-new-require': 'error',
'block-spacing': 'warn',
'brace-style': ['warn', '1tbs', {'allowSingleLine': true}],
'camelcase': 'warn',
'comma-dangle': 'error',
'comma-spacing': 'warn',
'comma-style': ['warn', 'last'],
'computed-property-spacing': 'warn',
'eol-last': 'warn',
'func-call-spacing': 'warn',
'indent': ['warn', 4],
'key-spacing': ['warn', {'beforeColon': false, 'afterColon': true}],
'max-len': ['warn', 120],
'new-cap': ['off', {
'capIsNewExceptions': [
'$.Deferred',
'$.Event',
'CodeMirror.Pos',
'Immutable.Map',
'Immutable.List',
'JSLINT'
]
}],
'new-parens': 'error',
'no-bitwise': 'error',
'no-new-object': 'error',
'no-trailing-spaces': 'warn',
'semi-spacing': 'warn',
'semi': 'error'
}
}
];
Loading
Loading