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
4 changes: 0 additions & 4 deletions bin/_headers.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const config: HeadersConfig = {
'https://status.maxmind.com',
'https://www.maxmind.com',

// eslint-disable-next-line max-len
// https://knowledge.hubspot.com/domains-and-urls/ssl-and-domain-security-in-hubspot#content-security-policy

// HubSpot API
Expand All @@ -33,7 +32,6 @@ const config: HeadersConfig = {

'https://*.googleapis.com',

// eslint-disable-next-line max-len
// https://developers.google.com/tag-platform/security/guides/csp#google_analytics_4_google_analytics
'https://*.google-analytics.com',
'https://*.analytics.google.com',
Expand All @@ -57,7 +55,6 @@ const config: HeadersConfig = {
'frame-src': [
"'self'",

// eslint-disable-next-line max-len
// https://knowledge.hubspot.com/domains-and-urls/ssl-and-domain-security-in-hubspot#content-security-policy

// HubSpot calls-to-action (pop-ups) and chatflows
Expand All @@ -76,7 +73,6 @@ const config: HeadersConfig = {
"'report-sample'",
"'unsafe-inline'",

// eslint-disable-next-line max-len
// https://knowledge.hubspot.com/domains-and-urls/ssl-and-domain-security-in-hubspot#content-security-policy

// HubSpot tracking code
Expand Down
153 changes: 18 additions & 135 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,134 +1,26 @@
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import security from 'eslint-plugin-security';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
ignores: [
'**/*.md',
'**/.cache',
'**/node_modules',
'**/public',
'eslint.config.mjs',
'bin/format-rawhtml.ts'
],
},
{
plugins: {
security,
'simple-import-sort': simpleImportSort,
},

languageOptions: {
globals: {
...globals.browser,
...globals.node,
__BASE_PATH__: true,
__PATH_PREFIX__: true,
graphql: true,
},

parser: tseslint.parser,
ecmaVersion: 6,
sourceType: 'module',

parserOptions: {
ecmaFeatures: {
modules: true,
},

requireConfigFile: false,
},
},

settings: {
'import/parsers': {
'@typescript-eslint/parser': [
'.ts',
],
},

polyfills: [
'CustomEvent',
'fetch',
'IntersectionObserver',
'Promise.all',
'Promise.race',
'Promise.resolve',
'URLSearchParams',
],
},

rules: {
'comma-dangle': [
'warn',
'always-multiline',
],
'eol-last': [
'warn',
'always',
],

'max-len': [
'warn',
{
code: 100,
},
],

'no-trailing-spaces': 'warn',

'object-curly-newline': [
'warn',
{
ExportDeclaration: 'never',

ImportDeclaration: {
multiline: true,
},

ObjectExpression: {
minProperties: 1,
multiline: true,
},

ObjectPattern: {
multiline: true,
},
},
],

'object-curly-spacing': [
'warn',
'always',
{
objectsInObjects: false,
},
],

'object-property-newline': 'warn',
'quote-props': [
'warn',
'as-needed',
],
quotes: [
'warn',
'single',
{
avoidEscape: true,
},
],
semi: [
1,
'always',
],

'simple-import-sort/imports': [
'warn',
{
Expand All @@ -145,56 +37,47 @@ export default tseslint.config(
[
'^\\.',
],
[
'\\.scss$',
],
],
},
],
'@typescript-eslint/no-unused-expressions': ['error', {
allowTernary: true
}],
allowTernary: true,
}],
},
},
{
}, {
files: [
'content/**',
'**/*.{js,cjs}',
],

rules: {
'max-len': [
0,
],
languageOptions: {
globals: {
...globals.node,
},
},
}, {
files: [
'**/*.mjs',
],

languageOptions: {
globals: {
...globals.nodeBuiltin,
},
},
{
}, {
files: [
'**/*.ts',
],

languageOptions: {
parser: tseslint.parser,
ecmaVersion: 5,
sourceType: 'script',

parserOptions: {
project: [
'tsconfig.json',
],
},
},

settings: {
'import/parsers': {
'@typescript-eslint/parser': [
'.ts',
],
},
},

rules: {
'@typescript-eslint/await-thenable': 'error',

'@typescript-eslint/naming-convention': ['error',
{
selector: 'default', format: ['camelCase'],
Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
"@types/node": "^25.3.3",
"baseline-browser-mapping": "^2.10.0",
"cspell": "^9.7.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-security": "^4.0.0",
"eslint": "^10.0.3",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^17.4.0",
"npm-run-all": "^4.1.5",
Expand All @@ -24,7 +22,7 @@
"stylelint-no-unsupported-browser-features": "^8.1.1",
"stylelint-order": "^7.0.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.1"
"typescript-eslint": "^8.58.0"
},
"engines": {
"node": ">=22.21.1",
Expand Down
Loading