8000 Update linting to latest by soulgalore · Pull Request #117 · sitespeedio/coach-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update linting to latest #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 28, 2024
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.

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

This file was deleted.

54 changes: 54 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const prettier = require('eslint-plugin-prettier');
const globals = require('globals');
const js = require('@eslint/js');
const { FlatCompat } = require('@eslint/eslintrc');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = [
{
ignores: ['**/dist/', '**/node_modules/', '**/test/', '**/tools/']
},
...compat.extends('eslint:recommended'),
{
plugins: {
prettier
},

languageOptions: {
globals: {
...globals.node
},

ecmaVersion: 2018,
sourceType: 'commonjs'
},

rules: {
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'none'
}
],

'no-extra-semi': 0,
'no-mixed-spaces-and-tabs': 0,
'no-prototype-builtins': 0
}
},
{
files: ['lib/dom/**'],
languageOptions: {
globals: {
...globals.browser,
util: true
}
}
}
];
2 changes: 0 additions & 2 deletions lib/dom/.eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion lib/dom/info/localStorageSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
}
try {
return storageSize(window.localStorage);
} catch (error) {
// eslint-disable-next-line no-unused-vars
} catch (e) {
return 'Could not access localStorage.';
}
})();
3 changes: 2 additions & 1 deletion lib/dom/info/sessionStorageSize.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

try {
return storageSize(window.sessionStorage);
} catch (error) {
// eslint-disable-next-line no-unused-vars
} catch (e) {
return 'Could not access sessionStorage';
}
})();
1 change: 1 addition & 0 deletions lib/har/info/technology.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module.exports = {
html
});
return Wappalyzer.resolve(detections);
// eslint-disable-next-line no-unused-vars
} catch (e) {
return {};
}
Expand Down
2 changes: 2 additions & 0 deletions lib/har/thirdParty.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports.getThirdParty = function (page) {
page && page.url.indexOf('localhost') > -1
? undefined
: getEntity(page.url);
// eslint-disable-next-line no-unused-vars
} catch (e) {
// https://github.com/sitespeedio/sitespeed.io/issues/3043
}
Expand All @@ -27,6 +28,7 @@ module.exports.getThirdParty = function (page) {
(asset && !asset.url.startsWith('http'))
? undefined
: getEntity(asset.url);
// eslint-disable-next-line no-unused-vars
} catch (e) {
continue;
}
Expand Down
Loading
0