Skip to content

Commit

Permalink
Chore: Remove legacy eslint code
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmondra committed Nov 13, 2024
1 parent e4d0573 commit ad09f66
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 101 deletions.
181 changes: 86 additions & 95 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,105 +1,96 @@
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [{
ignores: ['**/node_modules', '**/scripts'],
}, ...compat.extends('airbnb-base'), {
export default [
{ ignores: ['**/node_modules', '**/scripts'] },
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},

ecmaVersion: 13,
// sourceType: 'commonjs',
ecmaVersion: 13,
globals: {
...globals.node,
...globals.mocha,
}
},

rules: {
'no-use-before-define': ['error', {
functions: false,
classes: false,
}],
'no-use-before-define': ['error', {
functions: false,
classes: false,
}],

'no-unused-vars': ['error', {
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
caughtErrors: 'none',
}],

camelcase: ['error', {
properties: 'always',
ignoreDestructuring: false,
}],

'no-unused-vars': ['error', {
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
caughtErrors: 'none',
}],
'no-undef': ['error'],

camelcase: ['error', {
properties: 'always',
ignoreDestructuring: false,
}],
'no-throw-literal': ['error'],

strict: ['off'],
'quote-props': ['off'],
'max-classes-per-file': ['off'],
'no-await-in-loop': ['off'],
'array-bracket-spacing': ['off'],
'arrow-body-style': ['off'],
'arrow-parens': ['off'],
'class-methods-use-this': ['off'],
'comma-dangle': ['off'],
'comma-spacing': ['off'],
'consistent-return': ['off'],
'func-names': ['off'],
'function-paren-newline': ['off'],
'global-require': ['off'],
'guard-for-in': ['off'],
indent: ['off'],
'key-spacing': ['off'],
'max-len': ['off'],
'newline-per-chained-call': ['off'],
'no-confusing-arrow': ['off'],
'no-console': ['off'],
'no-continue': ['off'],
'no-else-return': ['off'],
'no-lonely-if': ['off'],
'no-mixed-operators': ['off'],
'no-multi-spaces': ['off'],
'no-multiple-empty-lines': ['off'],
'no-param-reassign': ['off'],
'no-plusplus': ['off'],
'no-prototype-builtins': ['off'],
'no-restricted-syntax': ['off'],
'no-shadow': ['off'],
'no-underscore-dangle': ['off'],
'no-unneeded-ternary': ['off'],
'no-useless-concat': ['off'],
'no-var': ['off'],
'object-curly-newline': ['off'],
'object-curly-spacing': ['off'],
'object-property-newline': ['off'],
'object-shorthand': ['off'],
'operator-assignment': ['off'],
'operator-linebreak': ['off'],
'padded-blocks': ['off'],
'prefer-arrow-callback': ['off'],
'prefer-const': ['off'],
'prefer-destructuring': ['off'],
'prefer-promise-reject-errors': ['off'],
'prefer-rest-params': ['off'],
'prefer-object-spread': ['off'],
'prefer-template': ['off'],
'space-before-blocks': ['off'],
'space-before-function-paren': ['off'],
'space-in-parens': ['off'],
'space-infix-ops': ['off'],
'spaced-comment': ['off'],
'vars-on-top': ['off'],
'import/extensions': ['off'],
'import/prefer-default-export': ['off'],
strict: ['off'],
'quote-props': ['off'],
'max-classes-per-file': ['off'],
'no-await-in-loop': ['off'],
'array-bracket-spacing': ['off'],
'arrow-body-style': ['off'],
'arrow-parens': ['off'],
'class-methods-use-this': ['off'],
'comma-dangle': ['off'],
'comma-spacing': ['off'],
'consistent-return': ['off'],
'func-names': ['off'],
'function-paren-newline': ['off'],
'global-require': ['off'],
'guard-for-in': ['off'],
indent: ['off'],
'key-spacing': ['off'],
'max-len': ['off'],
'newline-per-chained-call': ['off'],
'no-confusing-arrow': ['off'],
'no-console': ['off'],
'no-continue': ['off'],
'no-else-return': ['off'],
'no-lonely-if': ['off'],
'no-mixed-operators': ['off'],
'no-multi-spaces': ['off'],
'no-multiple-empty-lines': ['off'],
'no-param-reassign': ['off'],
'no-plusplus': ['off'],
'no-prototype-builtins': ['off'],
'no-restricted-syntax': ['off'],
'no-shadow': ['off'],
'no-underscore-dangle': ['off'],
'no-unneeded-ternary': ['off'],
'no-useless-concat': ['off'],
'no-var': ['off'],
'object-curly-newline': ['off'],
'object-curly-spacing': ['off'],
'object-property-newline': ['off'],
'object-shorthand': ['off'],
'operator-assignment': ['off'],
'operator-linebreak': ['off'],
'padded-blocks': ['off'],
'prefer-arrow-callback': ['off'],
'prefer-const': ['off'],
'prefer-destructuring': ['off'],
'prefer-promise-reject-errors': ['off'],
'prefer-rest-params': ['off'],
'prefer-object-spread': ['off'],
'prefer-template': ['off'],
'space-before-blocks': ['off'],
'space-before-function-paren': ['off'],
'space-in-parens': ['off'],
'space-infix-ops': ['off'],
'spaced-comment': ['off'],
'vars-on-top': ['off'],
'import/extensions': ['off'],
'import/prefer-default-export': ['off'],
},
}];
}
];
2 changes: 0 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.0",
"description": "Node.js packages to interact with the OpenReview API and data",
"main": "index.js",
"type": "module",
"scripts": {
"test": "npm install && lerna run test",
"coverage": "npm install --include=optional && lerna run coverage",
Expand All @@ -30,8 +31,6 @@
"packages/meta-extraction"
],
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"globals": "^15.12.0",
"lerna": "^8.1.9"
},
Expand Down
1 change: 0 additions & 1 deletion packages/client/src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import fs from 'fs';
import { FormData } from 'formdata-node';
// eslint-disable-next-line import/no-unresolved
import { fileFromPath } from 'formdata-node/file-from-path';
import { Readable } from 'stream';
import { FormDataEncoder } from 'form-data-encoder';
Expand Down
1 change: 0 additions & 1 deletion packages/meta-extraction/test/test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad09f66

Please sign in to comment.