How are Trump's recently imposed customs duties on China legal? According to WTO regulations, aren't you supposed to treat all your trading partners equally?
WTO has no direct effect on US law beyond what Congress enacts, namely the Uruguay Round Agreements Act. §102(a) of the act affirms the supremacy of US law, meaning we can do what we want if Congress approves. Title 19 generally deals with customs duties, and import tariffs have been legal for a long time. The Trade Expansion Act, passed by Congress, allows the President to impose tariffs based on a recommendation from the U.S. Secretary of Commerce if "an article is being imported into the United States in such quantities or under such circumstances as to threaten or impair the national security" (19 USC 1862). The Trade Act of 1974, passed by Congress, also authorizes the president to implement tariffs, which (§301) Trump relied on in imposing tariffs on Chinese imports.