summaryrefslogtreecommitdiff
path: root/.eslintrc.js
AgeCommit message (Collapse)AuthorFilesLines
2024-03-05Upgrade eslintEd Tanous1-3/+2
Being on an old version of eslint is causing conflicts in our builds, but because we pull in the @vue/cli-plugin-eslint plugin, we can't upgrade. @vue is non trial to update, because webui-vue is on vue 4.X, while the latest is 5.X. This commit upgrades eslint to the latest version, and at the same time disables @vue/cli-plugin-eslint. Not having a cli plugin doesn't seem like it would be any amount of impact, as devs can just run eslint manually. At the same time, to fix a minor issue, update all of @vue to the latest minor revision 4.5.12->4.5.19 Change-Id: I3ca9c7bbee5bdf9046d86e25e7130808b9caaa2b Signed-off-by: Ed Tanous <ed@tanous.net>
2020-11-12Resolve custom-event-name-casing lint warningsSukanya Pandey1-1/+0
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I9eea4eac3b8cacc216fc9ad1011e51622622e75f
2020-11-10Update failing unit testsDerick Montague1-4/+0
- Add babel plugin to handle Jest import of SVG. Without plugin the test fails with a require.context() is undefined - Update snapshot tests that have changed - Removed globals from .eslintrc.js that were needed prior to migrating from Mocha and Chai to Jest Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ibd01d2e629b5ecb47d072e277e4e9b5ae5c5f001
2020-11-06Resolve vue/no-unused-vars lint warningsSukanya Pandey1-1/+0
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I25ca1e451af5e793cd864d484572049e04cf09bc
2020-11-03Fix eslint no-prototype-builtins errorsYoshie Muranaka1-1/+0
Made updates to TableToolbar, ModalAddRoleGroup, and ModalUploadCertificate components. https://eslint.org/docs/rules/no-prototype-builtins Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com> Change-Id: Ic143cd244b288bc089a9416699d7c3d4349a500c
2020-11-03Update linting packages to use latestDerick Montague1-12/+15
- 99% of changes were small syntax changes that were changed by the lint command. There were a couple of small manual changes to meet the property order patterns established as part of the vue:recommended guidelines. There are rules that were set from errors to warnings and new stories are being opened to address those issues. Testing: - Successfully ran npm run serve - Successfully ran npm run lint - Verified functionality works as expected, e.g. success and failure use cases - Resolved any JavaScript errors thrown to the console Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie082f31c73ccbe8a60afa8f88a9ef6dbf33d9fd2
2020-05-05Use Jest as the test frameworkDerick Montague1-1/+1
- Remove mocha, chai, sinon and setup.js - Add snapshot test to ApplicationHeader spec and remove skip nav link test - Add an update snapshot test that can be run if a page changes and the snapshot needs to be updated - Remove tight coupling of application structure and test in ApplicationHeader spec We are changing to Jest for a few reasons: 1. Jest is the testing framework used by most Vue applications and has robust documentation 2. It requires less configuration and works out of the box 3. It includes the ability to perform snapshot testing of rendered UI, which is much easier to maintain than trying to test specific UI elements. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I7bca3613991ebae1fd464fa3a60f079d044ed7b4
2020-03-26Add mocha and chai test frameworkSukanya Pandey1-1/+5
- Mocha/Chai/Sinon test frameowrk because it has 100% feature parity with vue-loader. - Code for making 'expect' function accessible globally. Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: Idf809cb08d8c1ef177ff92f0ee1be04ac74059a3
2020-01-31Change eslint rules to use vue recommendedDerick Montague1-2/+3
Resubmitting after reverted–original commit here https://gerrit.openbmc-project.xyz/c/openbmc/webui-vue/+/28763/7 - Ran npm run lint - Resolved eslint issues Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I2b8b9244acddd483d0a72f9a5d156a79de9869a0
2020-01-29Revert "Change eslint rules to use vue recommended"Gunnar Mills1-3/+2
Merged accidentally. Although this one did have the proper +1s/+2s. The 2 underneath did not. The author will resubmit. This reverts commit 5e7ac49058e5dc37fd43ecf3c0d06f5dda14af5b. Change-Id: Iceb1de3a170cc0b592b183545c792aa3eb87bfee Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-01-29Change eslint rules to use vue recommendedDerick Montague1-2/+3
- Ran npm run lint - Resolved eslint issues Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Icd433ca55321d8bceb941e2d13ebade72bd4981f
2020-01-29Fix linting in script blocks in vue filesDerick Montague1-1/+7
- Removed the .eslintrc and added the pretteri rules to the eslintrc file - Ran `npm run lint --fix` Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I4e36c1967ae9b4d839ef88f1d47ffa20ab4e4991
2020-01-27Add singlequote override and fix filesDerick Montague1-6/+6
Based on phosphor-webui and JavaScript common practices we are setting ESLint to required single quote for JS files and double quote for SCSS files. This commit adds the ESLint override to the prettier rules and runs the npm lint script that fixes the files that violate the rule. Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: I50cba77b2d0797595ce94258029608efa8665005
2020-01-21Create basic application using vueDerick Montague1-0/+25
- Create vue app - Add AppHeader and AppNavigation - Set up routes for server overview and local user management - Add themes and set to gray-10 theme - Add active class for current navigation - Add a prototype method named $http to vue prototype - The UI uses console logs in production to communicate to users - Add boostrap vue component library Change-Id: Ib6618e6357ca01bdac6de4ed031a15c8552226f3 Signed-off-by: Derick Montague <derick.montague@ibm.com>