Skip to content

Instantly share code, notes, and snippets.

@RyanParsley
Last active September 29, 2022 14:48
Show Gist options
  • Save RyanParsley/b6db4783cd59ab30de1b73da215c9687 to your computer and use it in GitHub Desktop.
Save RyanParsley/b6db4783cd59ab30de1b73da215c9687 to your computer and use it in GitHub Desktop.
Opinionated Angular Config Overrides
{
...
"plugins": ["functional", "unused-imports" ],
"overrides": [
{
"files": ["*.spec.ts", "*.ts"],
"rules": {
"no-console": ["error", { "allow": ["error"] }],
"unused-imports/no-unused-imports": "error"
}
},
{
"files": ["*.ts"],
"excludedFiles": ["*.spec.ts", "*.stories.ts"],
"extends": [
"plugin:functional/no-mutations",
],
"rules": {
"functional/immutable-data": [
{
"ignoreAccessorPattern": ["**._mutable*", "**.mutable*"]
}
]
}
}
]
}
{
"extends": "stylelint-config-standard-scss",
"plugins": ["stylelint-no-px"],
"rules": {
"string-quotes": "single",
"color-no-hex": true,
"meowtec/no-px": [true],
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": ["ng-deep"]
}
]
},
"overrides": [
{
"files": ["**/*.ts"],
"customSyntax": "postcss-styled",
"rules": {
"no-empty-first-line": null,
"no-missing-end-of-source-newline": null,
"no-eol-whitespace": null
}
}
]
}
{
...
"schematics": {
"@schematics/angular:component": {
"style": "scss",
"inlineStyle": true,
"inlineTemplate": true,
"changeDetection": "OnPush"
},
...
}
@RyanParsley
Copy link
Author

Devs complain about inline style not playing nice with syntax highlighting, but that just boils down to them not having their tools configured properly. Which makes sense because postcss config doesn't explicitly lay out how and I've read medium posts that state it's not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment