mirror of
https://github.com/sadan4/dotfiles.git
synced 2024-11-16 23:04:39 -05:00
118 current 2024-05-10 22:14:56 24.05.20240419.5c24cf2 6.6.28 *
This commit is contained in:
parent
77d3f695d5
commit
f531235399
2 changed files with 102 additions and 2 deletions
|
@ -123,8 +123,14 @@ in
|
||||||
# '')
|
# '')
|
||||||
(pkgs.writeShellScriptBin "__eslint_default_config" ''
|
(pkgs.writeShellScriptBin "__eslint_default_config" ''
|
||||||
|
|
||||||
echo $(pwd)
|
if [[ -e ./.eslintrc.json ]]; then
|
||||||
exit 0
|
eslint_d $@
|
||||||
|
exit $?
|
||||||
|
else
|
||||||
|
eslint_d --config /home/${config.home.username}/.config/.eslintrc.json $@
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
@ -135,6 +141,10 @@ in
|
||||||
source = ../../dotfiles/kitty;
|
source = ../../dotfiles/kitty;
|
||||||
target = "./.config/kitty";
|
target = "./.config/kitty";
|
||||||
};
|
};
|
||||||
|
eslint_d_config = {
|
||||||
|
source = ../../dotfiles/eslintrc.json;
|
||||||
|
target = "./.config/.eslintrc.json";
|
||||||
|
};
|
||||||
gh = {
|
gh = {
|
||||||
recursive = true;
|
recursive = true;
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/gh";
|
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/gh";
|
||||||
|
|
90
dotfiles/eslintrc.json
Normal file
90
dotfiles/eslintrc.json
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"es2021": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"files": [".eslintrc.{js,cjs}"],
|
||||||
|
"parserOptions": {
|
||||||
|
"sourceType": "script"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": "latest"
|
||||||
|
},
|
||||||
|
"plugins": ["@stylistic"],
|
||||||
|
"rules": {
|
||||||
|
"@stylistic/indent": ["error", 4],
|
||||||
|
"@stylistic/linebreak-style": ["error", "unix"],
|
||||||
|
"@stylistic/quotes": [
|
||||||
|
"error",
|
||||||
|
"double",
|
||||||
|
{
|
||||||
|
"allowTemplateLiterals": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/semi": ["error", "always"],
|
||||||
|
"@stylistic/array-bracket-newline": ["error", "always"],
|
||||||
|
"newline-per-chained-call": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"ignoreChainWithDepth": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/comma-dangle": ["error", "always-multiline"],
|
||||||
|
"@stylistic/brace-style": "error",
|
||||||
|
"@stylistic/arrow-parens": ["error", "always"],
|
||||||
|
"@stylistic/arrow-spacing": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"before": true,
|
||||||
|
"after": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/block-spacing": ["error", "always"],
|
||||||
|
"@stylistic/comma-spacing": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"before": false,
|
||||||
|
"after": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/computed-property-spacing": ["error", "never"],
|
||||||
|
"@stylistic/dot-location": ["error", "property"],
|
||||||
|
"@stylistic/function-call-spacing": ["error", "never"],
|
||||||
|
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
||||||
|
"@stylistic/function-paren-newline": ["error", "consistent"],
|
||||||
|
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
|
||||||
|
"@stylistic/indent-binary-ops": ["error", 4],
|
||||||
|
"@stylistic/key-spacing": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"beforeColon": false,
|
||||||
|
"afterColon": true,
|
||||||
|
"mode": "strict"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/keyword-spacing": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"before": true,
|
||||||
|
"after": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/lines-around-comment": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"beforeBlockComment": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@stylistic/lines-between-class-members": ["error", "always"],
|
||||||
|
"@stylistic/new-parens": ["error", "always"]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue