-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Revise prettier config * Let Prettier read config from `.editorconfig`; use default for trailingComma * Upgrade eslint and introduce typescript parser * Add overrides for obsolete dependencies * Fix Cypress tests * Resolve 'this alias' lint errors and add more typing packages * Fix tsconfig * Resolve jQuery and DOM deprecations * URLSearchParams is fully supported since 2018 * IntersectionObserver has been available since 2019 * Specify version number in NPM override * Removing sourcemap-codec override * Revise lockfile back to v3 --------- Co-authored-by: Vidya Ramakrishnan <vidya@hasgeek.in>
- Loading branch information
Showing
103 changed files
with
5,606 additions
and
3,482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
const OFF = 0; | ||
const WARN = 1; | ||
const ERROR = 2; | ||
module.exports = { | ||
parser: 'babel-eslint', | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
ignorePatterns: [ | ||
'build/*', | ||
'funnel/static/build/*', | ||
'funnel/static/gen/*', | ||
'funnel/static/js/libs/*', | ||
'funnel/static/js/*.packed.js', | ||
], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
jquery: true, | ||
node: true, | ||
}, | ||
extends: ['airbnb-base', 'plugin:prettier/recommended', 'plugin:cypress/recommended'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:prettier/recommended', | ||
'plugin:cypress/recommended', | ||
'plugin:@typescript-eslint/strict', | ||
'plugin:@typescript-eslint/stylistic', | ||
], | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
'no-console': WARN, | ||
'prefer-arrow-callback': [ERROR, { allowNamedFunctions: true }], | ||
'prefer-const': WARN, | ||
'new-cap': WARN, | ||
'no-param-reassign': [ERROR, { props: false }], | ||
'no-console': 'warn', | ||
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }], | ||
'prefer-const': 'warn', | ||
'new-cap': 'warn', | ||
'no-param-reassign': ['error', { props: false }], | ||
// allow debugger during development | ||
'no-debugger': process.env.NODE_ENV === 'production' ? ERROR : OFF, | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'cypress/no-unnecessary-waiting': 'off', | ||
'@typescript-eslint/no-this-alias': ['error', { allowedNames: ['self'] }], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import SaveProject from './utils/bookmark'; | ||
import saveProject from './utils/bookmark'; | ||
|
||
$(() => { | ||
$('.js-save-form').each(function saveProjectButton() { | ||
const projectSaveConfig = { | ||
formId: $(this).attr('id'), | ||
postUrl: $(this).attr('action'), | ||
}; | ||
SaveProject(projectSaveConfig); | ||
saveProject(projectSaveConfig); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.