Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 May 01:55
· 174 commits to main since this release
aadb64a

Minor Changes

  • #85 46d8e4d Thanks @baseballyama! - configs.recommended now includes a plugins: { postgresql } field. Spreading ...postgresql.configs.recommended in a flat ESLint config now binds the plugin automatically, so consumers no longer have to add plugins: { postgresql } separately for the rule severities to resolve. The README example continues to work as written.

  • #74 0de0fa9 Thanks @baseballyama! - Add postgresql/no-char-type rule: warns on blank-padded char(n) / bpchar columns. Enabled at warn severity in configs.recommended.

  • #66 7a964c8 Thanks @baseballyama! - Add postgresql/no-cross-join rule: warns on CROSS JOIN. Enabled at warn severity in configs.recommended.

  • #64 5728c3a Thanks @baseballyama! - Add postgresql/no-drop-table-cascade rule: warns on DROP ... CASCADE (table, schema, type, etc.) because CASCADE silently removes dependent objects. Enabled at warn severity in configs.recommended.

  • #75 83c62af Thanks @baseballyama! - Add postgresql/no-grant-to-public rule: warns on GRANT ... TO PUBLIC because PUBLIC covers every current and future role. REVOKE ... FROM PUBLIC is unaffected. Enabled at warn severity in configs.recommended.

  • #80 beda810 Thanks @baseballyama! - Add postgresql/no-implicit-join rule: warns on comma-separated FROM clauses and recommends explicit JOIN ... ON .... Enabled at warn severity in configs.recommended.

  • #73 7e82530 Thanks @baseballyama! - Add postgresql/no-money-type rule: errors on the money column type. Enabled at error severity in configs.recommended.

  • #67 6c5bbdc Thanks @baseballyama! - Add postgresql/no-natural-join rule: errors on NATURAL JOIN because the join columns are implicit and silently change when columns are added. Enabled at error severity in configs.recommended.

  • #77 39ff6db Thanks @baseballyama! - Add postgresql/no-not-in-subquery rule: errors on NOT IN (subquery) because a single NULL in the subquery yields zero rows. Literal NOT IN (1, 2, 3) lists are unaffected. Enabled at error severity in configs.recommended.

  • #61 86401b5 Thanks @baseballyama! - Add postgresql/no-select-star rule: warns on SELECT * and <alias>.* so result schemas stay stable when the underlying table changes. Off by default; opt in by setting it in your ESLint config.

  • #65 86a8b58 Thanks @baseballyama! - Add postgresql/no-truncate-cascade rule: warns on TRUNCATE ... CASCADE because it transitively empties tables that have foreign keys referencing the target. Enabled at warn severity in configs.recommended.

  • #76 3936f18 Thanks @baseballyama! - Add postgresql/prefer-create-index-concurrently rule: warns on plain CREATE INDEX and recommends CREATE INDEX CONCURRENTLY. Off by default because the right answer depends on the migration framework.

  • #69 f61bc71 Thanks @baseballyama! - Add postgresql/prefer-identity-over-serial rule: warns on SMALLSERIAL, SERIAL, BIGSERIAL columns and recommends GENERATED ALWAYS AS IDENTITY. Enabled at warn severity in configs.recommended.

  • #68 7f29dda Thanks @baseballyama! - Add postgresql/prefer-jsonb-over-json rule: warns on columns declared as json and recommends jsonb. Enabled at warn severity in configs.recommended.

  • #71 d1f8a07 Thanks @baseballyama! - Add postgresql/prefer-text-over-varchar rule: warns on varchar(n) and recommends text with a CHECK constraint when a length cap is needed. Enabled at warn severity in configs.recommended.

  • #72 03a9945 Thanks @baseballyama! - Add postgresql/prefer-timestamptz rule: warns on timestamp without time zone columns and recommends timestamptz. Enabled at warn severity in configs.recommended.

  • #70 6142324 Thanks @baseballyama! - Add postgresql/require-primary-key rule: warns on CREATE TABLE statements that do not declare a primary key. Enabled at warn severity in configs.recommended.

  • #62 a4c56b3 Thanks @baseballyama! - Add postgresql/require-where-in-delete rule: errors on DELETE statements without a WHERE clause to prevent accidentally emptying tables. Enabled at error severity in configs.recommended.

  • #63 3d0df38 Thanks @baseballyama! - Add postgresql/require-where-in-update rule: errors on UPDATE statements without a WHERE clause. Enabled at error severity in configs.recommended.

  • #79 5a085bf Thanks @baseballyama! - Add postgresql/snake-case-column-name rule: warns when a column declared in CREATE TABLE is not snake_case. Enabled at warn severity in configs.recommended.

  • #78 05a47b2 Thanks @baseballyama! - Add postgresql/snake-case-table-name rule: warns when a CREATE TABLE declares a table name that is not snake_case (typically a quoted mixed-case identifier). Enabled at warn severity in configs.recommended.