- Fix circular dependecy issue between plugin and recommended, making customization fail
- Add
customized
example (with tests) to display the customization options
- Add
- Breaking:
bigint
anddecimal
are now parsed correctly according to the driver (#5)- There is new option
driver
forenforce-column-types
: can be 'postgres', 'mysql' or 'sqlite' - If the driver is empty (default) or set to MySQL and PostgreSQL, bigint and decimal are parsed to be strings
- If the driver is set to SQLite, bigint and decimal are parsed to be numbers
- For more information, see #5
- There is new option
- Add support for ESM Relation wrapper (#16, #17, thanks to @lmeysel for initial implementation)
- Add option to
enforce-relation-type
to make sure that relation wrapper is specified everywhere
- Update dependencies to fix critical issue in
cross-spawn
and@eslint/plugin-kit
- Add support for flat configuration
- Update
typescript-eslint
packages to v8 - Update
eslint
packages to v9 - There is a new export
eslint-plugin-typeorm-typescript/recommended
, for simple interfacing of the flat configuration
- Update
- Add dual ES Module and CommonJS support
- Add
tsconfig.es.json
to output ES Modules toes/
- Output CommonJS format to
dist/
(needs hack to set themodule
tocommonjs
inpackage.json
) - Add
exports
fields topackage.json
for.
and./recommended
- Add extension to every import to comply with ES specification
- Add
- Add examples to be used as simple setup and end-to-end tests
- Ignore array on JSON columns
- NEW RULE
enforce-consistent-nullability
: enable this to make sure that nullable is consistent everywhere (#9)- set
specifyNullable
toalways
to make thenullable
property required everywhere - set
specifyNullable
tonon-default
(default behaviour) to print errors whennullable
is set to the default value
- set
- Allow Column decorator to handle string parameters, multiple parameters
- Add UUID column-type to string types
- Add support for additional Column decorators:
- Primary column decorators
PrimaryColumn
,PrimaryGeneratedColumn
is number by default, - Date column decorators
CreateDateColumn
,UpdateDateColumn
is date by default,DeleteDateColumn
is nullable, - Version column decorator
VersionColumn
is number.
- Primary column decorators
- Add support for Typed Rules on Column types
- This allows to resolve referenced types (e.g. type aliases) in TypeScript types
- Allow lazy relations with
Promise<Relation>
(#10) - Report error when the relation doesn't have an arrow function defined
- Fix issue when empty Column type doesn't get report nullability errors
- Upgrade packages
- Upgrade TypeScript-ESLint from v6 to v7
- Remove AirBNB ESLint configuration
- Refactor internal column types
- Replace date with Date to match with TypeScript type (#6)
- Replace other with unknown
- Change undefined cases to unknown
- Refactor tests to provide better messages
- Ignore column check when the transformer property is set
- Test cases when unknown object or reference type
- Update dependencies
- Add
text
type to stringLikes
- Updated packages
- Updated packages
- Add MIT License
- Upgrade dependencies
- Upgrade
prettier
andeslint-plugin-prettier
to version 3, reformat files - Upgrade
@typescript-eslint/*
to version 6 - Added vitest for testing
- Upgrade
- Fix problem where literal types didn't trigger the relations rule
- Fix problem where if any options where given,
nullable
was interpreted asfalse
- Fix URLs in the documentation URLs
- README documentation for both rules
- Initial release, with two rules
- typeorm-typescript/enforce-column-types: Checks if the TypeORM column's data type and TypeScript type is consistent.
- typeorm-typescript/enforce-relation-types: Checks if the TypeORM relation's data type and TypeScript type is consistent.