Skip to content
Open
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
Binary file added bazelisk
Binary file not shown.
6 changes: 6 additions & 0 deletions example/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ startup --windows_enable_symlinks
common:linux --action_env=BAZEL_CXXOPTS="-std=c++20"
common:windows --action_env=BAZEL_CXXOPTS="/std:c++20"

######################
# Linters
# https://github.com/aspect-build/rules_lint/blob/v1.7.0/docs/linting.md#4-errors-during-bazel-build
#
build --@aspect_rules_lint//lint:fail_on_violation
build --aspects=//tools/lint:linters.bzl%eslint
20 changes: 20 additions & 0 deletions example/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,23 @@ ruby.bundle_fetch(
use_repo(ruby, "bundle", "ruby", "ruby_toolchains")

register_toolchains("@ruby_toolchains//:all")

# Read more about it https://blog.aspect.build/hermetic-c-toolchain
bazel_dep(name = "gcc_toolchain", version = "0.9.0")

gcc_toolchains = use_extension("@gcc_toolchain//toolchain:module_extensions.bzl", "gcc_toolchains", dev_dependency = True)
gcc_toolchains.toolchain(
name = "gcc_toolchain_x86_64",
extra_ldflags = [
"-lstdc++", # Need this flag for C++ stdlib https://github.com/f0rmiga/gcc-toolchain/tree/main/docs#c
"-l:libstdc++.a", # This is for static linking https://github.com/f0rmiga/gcc-toolchain/tree/main/docs#linking-c-standard-library
],
gcc_version = "15.2.0",
target_arch = "x86_64",
)
use_repo(gcc_toolchains, "gcc_toolchain_x86_64")

register_toolchains(
"@gcc_toolchain_x86_64//:cc_toolchain",
dev_dependency = True,
)
Binary file added example/bazelisk
Binary file not shown.
3 changes: 3 additions & 0 deletions example/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default tseslint.config(
project: true,
},
},
rules: {
"no-unused-vars": "error",
},
},
// Demonstrate override for a subdirectory.
// Note that unlike eslint 8 and earlier, it does not resolve to a configuration file
Expand Down
2 changes: 2 additions & 0 deletions example/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import dayjs from "dayjs";

import { Greeter } from "./file-dep";

const unused = "dsfdsfdsf"; // this is an unused var linting violation

// this is a linting violation, and is auto-fixed under `--fix`
const a: string = "a";
console.log(a);
Expand Down
Loading