Skip to content
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

Enable no-unchecked-record-access for client packages #23431

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion experimental/dds/attributable-map/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ module.exports = {

// TODO: consider re-enabling once we have addressed how this rule conflicts with our error codes.
"unicorn/numeric-separators-style": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion experimental/dds/sequence-deprecated/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ module.exports = {
"import/no-deprecated": "off", // This package uses deprecated APIs by design.
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/dds/map/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {

// TODO: consider re-enabling once we have addressed how this rule conflicts with our error codes.
"unicorn/numeric-separators-style": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/matrix/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
rules: {
"@typescript-eslint/no-shadow": "off",
"space-before-function-paren": "off", // Off because it conflicts with typescript-formatter
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ module.exports = {
"no-case-declarations": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"unicorn/no-useless-spread": "off", // Off because it generates incorrect code in autofixes and cannot distinguish useful copies of arrays from useless ones
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/dds/sequence/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
rules: {
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
settings: {
"import/extensions": [".ts", ".tsx", ".d.ts", ".js", ".jsx"],
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/tree/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
rules: {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-interface": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",

// This package is build with noUnusedLocals disabled for a specific use case (see note in tsconfig.json),
// but should reject other cases using this rule:
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/driver-web-cache/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ module.exports = {
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/no-misused-promises": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/drivers/odsp-driver/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {

// This library uses and serializes "utf-8".
"unicorn/text-encoding-identifier-case": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/replay-driver/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ module.exports = {
],
rules: {
"@typescript-eslint/strict-boolean-expressions": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/drivers/routerlicious-driver/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ module.exports = {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"no-case-declarations": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 2 additions & 0 deletions packages/framework/presence/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module.exports = {
// The clarity of explicit index signatures is helpful in many places with this package.
"@typescript-eslint/consistent-indexed-object-style": "off",

"@fluid-internal/fluid/no-unchecked-record-access": "error",

// TODO: Reenable no-explicit-any once need with ValueDirectoryOrState is
// understood. If `any` is still needed disable is on a per line basis.
"@typescript-eslint/no-explicit-any": "off",
Expand Down
2 changes: 1 addition & 1 deletion packages/loader/driver-utils/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
},
rules: {
"import/no-nodejs-modules": ["error"],
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/container-runtime/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
},
rules: {
"@typescript-eslint/strict-boolean-expressions": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/id-compressor/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
},
rules: {
"@typescript-eslint/strict-boolean-expressions": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/runtime-utils/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module.exports = {
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
},
rules: {
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/test/functional-tests/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
"prettier",
],
rules: {
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/test/local-server-tests/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
rules: {
"@typescript-eslint/strict-boolean-expressions": "off", // requires strictNullChecks=true in tsconfig
"import/no-nodejs-modules": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
"import/no-extraneous-dependencies": [
"error",
{
Expand Down
2 changes: 1 addition & 1 deletion packages/test/test-drivers/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
rules: {
"import/no-nodejs-modules": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/test/test-end-to-end-tests/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
rules: {
"prefer-arrow-callback": "off",
"@typescript-eslint/strict-boolean-expressions": "off", // requires strictNullChecks=true in tsconfig
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",

// This library is used in the browser, so we don't want dependencies on most node libraries.
"import/no-nodejs-modules": ["error"],
Expand Down
2 changes: 1 addition & 1 deletion packages/test/test-service-load/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
rules: {
"import/no-nodejs-modules": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/test/test-utils/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
rules: {
"import/no-nodejs-modules": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
2 changes: 1 addition & 1 deletion packages/tools/devtools/devtools-core/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {

// Disabled because it is incompatible with API-Extractor.
"@typescript-eslint/no-namespace": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/devtools/devtools-test-app/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
// TODO: AB#18875 - Re-enable react/no-deprecated once we replace uses of the deprecated ReactDOM.render()
// with the new React 18 createRoot().
"react/no-deprecated": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/devtools/devtools-view/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
// Disabled because they disagrees with React common patterns / best practices.
"@typescript-eslint/unbound-method": "off",
"unicorn/consistent-function-scoping": "off",
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",

// Disabled because they conflict with Prettier.
"unicorn/no-nested-ternary": "off",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/fetch-tool/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ module.exports = {
rules: {
// This library is used in the browser, so we don't want dependencies on most node libraries.
"import/no-nodejs-modules": ["error", { allow: ["child_process", "fs", "util"] }],
"@fluid-internal/fluid/no-unchecked-record-access": "warn",
"@fluid-internal/fluid/no-unchecked-record-access": "error",
},
};
Loading